Exemplo n.º 1
0
        public ActionResult CreateAccount(MerchantCreationModel model)
        {
            if (ModelState.IsValid)
            {
                var user = Session[Utils.UserKey] as UserModel;

                var businessName = model.BusinessName;
                var businessPhone = model.BusinessPhone;
                var businessFax = model.BusinessFax;
                var dba = model.DBA;
                var emailAddress = model.Email;
                var cellularNumber = model.CellPhone;
                var businessStreet = model.BusinessStreet;
                var businessCity = model.BusinessCity;
                var businessState = model.BusinessState;
                var businessZip = model.BusinessZip;
                var merchant_MainContactPhone = model.GuarantorPhone;
                var merchant_MainContact = model.GuarantorName;
                var merchant_RepId = user.UserId;
                var repName = user.Name;

                var reportData = _virtualOfficeService.CreatePosPendingMerchants(businessName, businessPhone, businessFax, dba, emailAddress, cellularNumber, businessStreet, businessCity, businessState, businessZip, merchant_MainContactPhone, merchant_MainContact, merchant_RepId, repName);

                if (reportData)
                {
                    SendConfirmationEmails();
                    var msg = string.Format("The merchant {0} has been added to our systems and is pending for approval.", businessName);
                    return RedirectToAction("CreateAccount", new { msg = msg });
                }
            }
            ViewBag.Error = "There was an error trying to add the new merchant. Please check the information and try again.";
            ViewBag.AllStates = GetAllStates();
            return View(model);
        }
Exemplo n.º 2
0
        public ActionResult CreateAccount(string msg)
        {
            var user = Session[Utils.UserKey] as UserModel;

            if (!user.IsFullcarga)
                return RedirectToAction("Index", "Reports");

            var model = new MerchantCreationModel();
            ViewBag.Message = msg;
            ViewBag.AllStates = GetAllStates();
            return View(model);
        }