public IActionResult RegisterFormFilled(RegisterViewModel registerViewModel)
        {
            //registerViewModel.Business.Category.CategoryName = registerViewModel.SearchViewModel.selectedCategory;
            if (ValidateBusiness(registerViewModel.Business))
            {
                if (registerViewModel.uploadImagesFormFile != null)
                {
                    List <FilePath> imagesFilesPath = new List <FilePath>();
                    foreach (var imageFormFile in registerViewModel.uploadImagesFormFile)
                    {
                        var uniqueFileName = GetUniqueFileName(imageFormFile.FileName);
                        var uploads        = Path.Combine(hostingEnvironment.WebRootPath, "uploads");
                        var filePath       = Path.Combine(uploads, uniqueFileName);
                        imageFormFile.CopyTo(new FileStream(filePath, FileMode.Create));
                        FilePath newImageFile = new FilePath();
                        //newImageFile.Path = filePath;
                        newImageFile.Path = "~/uploads/" + imageFormFile.FileName;
                        imagesFilesPath.Add(newImageFile);
                    }
                    registerViewModel.Business.Images = imagesFilesPath;

                    //to do : Save uniqueFileName  to your db table
                }
                //registerViewModel.Business.Timings = new Timings { Monday = new DayToTimeMapping { StartTime = "10:23", EndTime = "9:00", Closed = false} };
                //if (_businessService.AddNewBusiness(registerViewModel.Business) != null)
                ////if (true)
                //{
                //return Json(new { success = true, responseText = "You have been successfully registered with Search India. Please Log_in to view your profile" });
                try
                {
                    Random randomObj     = new Random();
                    string transactionId = randomObj.Next(10000000, 100000000).ToString();

                    Razorpay.Api.RazorpayClient client  = new Razorpay.Api.RazorpayClient("rzp_test_E2Zmqlh9v2Dj8U", "NPTQwUFJV6R36LW2fPir43pG");
                    Dictionary <string, object> options = new Dictionary <string, object>();
                    options.Add("amount", 249);      // Amount will in paise
                    options.Add("receipt", transactionId);
                    options.Add("currency", "INR");
                    options.Add("payment_capture", "0");     // 1 - automatic  , 2 - manual
                                                             //options.Add("notes", "-- You can put any notes here --");
                    Razorpay.Api.Order orderResponse = client.Order.Create(options);
                    string             orderId       = orderResponse["id"].ToString();

                    // Create order model for return on view
                    OrderModel orderModel = new OrderModel
                    {
                        orderId       = orderResponse.Attributes["id"],
                        razorpayKey   = "rzp_test_E2Zmqlh9v2Dj8U",
                        amount        = 249,
                        currency      = "INR",
                        name          = registerViewModel.Business.BusinessOwner.FirstName + registerViewModel.Business.BusinessOwner.LastName,
                        email         = registerViewModel.Business.BusinessOwner.Email,
                        contactNumber = registerViewModel.Business.BusinessOwner.MobileNumber,
                        address       = registerViewModel.Business.Address.AddressLine1 + registerViewModel.Business.Address.City,
                        description   = "TownerTown Payments"
                    };

                    Payment payment = new Payment();
                    registerViewModel.Business.Payment                   = payment;
                    registerViewModel.Business.Payment.address           = orderModel.name;
                    registerViewModel.Business.Payment.orderId           = orderModel.orderId;
                    registerViewModel.Business.Payment.PayedOn           = DateTime.Now;
                    registerViewModel.Business.Payment.PaymentStatus     = PaymentStatus.INPROGRESS;
                    registerViewModel.Business.Payment.Amount            = orderModel.amount;
                    registerViewModel.Business.Payment.contactNumber     = orderModel.contactNumber;
                    registerViewModel.Business.Payment.currency          = orderModel.currency;
                    registerViewModel.Business.Payment.description       = orderModel.description;
                    registerViewModel.Business.Payment.email             = orderModel.email;
                    registerViewModel.Business.Payment.name              = orderModel.name;
                    registerViewModel.Business.Payment.razorpayKey       = orderModel.razorpayKey;
                    registerViewModel.Business.Payment.TransactionNumber = "value";

                    Business business = _businessService.AddNewBusiness(registerViewModel.Business);
                    if (business != null)
                    {
                        _session.SetInt32("UserID", business.BusinessOwner.ID);
                        return(View("Payments", orderModel));
                    }
                }
                catch (Exception ex)
                {
                    //throw (e);
                    string message = string.Format("<b>Message:</b> {0}<br /><br />", ex.Message);
                    message += string.Format("<b>StackTrace:</b> {0}<br /><br />", ex.StackTrace.Replace(Environment.NewLine, string.Empty));
                    message += string.Format("<b>Source:</b> {0}<br /><br />", ex.Source.Replace(Environment.NewLine, string.Empty));
                    message += string.Format("<b>TargetSite:</b> {0}", ex.TargetSite.ToString().Replace(Environment.NewLine, string.Empty));
                    ModelState.AddModelError(string.Empty, message);
                    ViewBag.Message = message;
                    return(View("Register"));
                }

                //}
            }
            else
            {
                return(View("Register"));
                //return Json(new { success = false, responseText = "OOOpppsss....Something went wrong, the registration cannot be saved at this movement please contact customer support." });
            }
            return(View("Register"));
            //return Json(new { success = false, responseText = "Validation doesn't match. Please check validation error message for more details" });
        }