public IActionResult SaveContactUs(MContactUs form)
        {
            string token = GetCpatchaToken();

            string validationMessage = ValidateContactUsForm(form, token);

            if (validationMessage != null)
            {
                ViewBag.Message = validationMessage;
            }
            else
            {
                IBusinessOperationManipulate <MContactUs> operation = GetSaveContactUsOperation();
                form.IP      = RemoteUtils.GetRemoteIPAddress(ControllerContext);
                form.Name    = StringUtils.StripTagsRegex(form.Name);
                form.Subject = StringUtils.StripTagsRegex(form.Subject);
                form.Email   = StringUtils.StripTagsRegex(form.Email);
                form.Message = StringUtils.StripTagsRegex(form.Message);

                operation.Apply(form);

                bool sendResult = SendEmail(form, token);

                if (sendResult)
                {
                    ViewBag.Message = "Your message has been received and we will contact you soon.";
                }
                else
                {
                    ViewBag.Message = "Unable to send the message, internal server error.";
                }
            }

            return(View("Contact"));
        }
        private IActionResult VerifyProduct(MRegistration param)
        {
            IBusinessOperationManipulate <MRegistration> operation = GetCreateRegistrationOperation();

            try
            {
                operation.Apply(param);
                ViewBag.Serial = param.SerialNumber;
                ViewBag.PIN    = param.Pin;

                LineNotify(param, "Production verification successfully.");

                return(View("Success"));
            }
            catch (Exception e)
            {
                ViewBag.Message = FilterSensitive(e.Message);
                LineNotify(param, e.Message);

                return(View("Fail"));
            }
        }