public async Task <ActionResult> upg_pmt_status(string txnref, string apprAmt) { try { var input = string.Concat(hc.product_id, txnref, hc.Mac_key); var hash = Cryptoclass.GenerateSHA512String(input); string response_url = "https://webpay.interswitchng.com/collections/api/v1/gettransaction.json?productid=8308&transactionreference=" + txnref + "&amount=" + apprAmt + ""; ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var client = new WebClient(); client.Headers.Add("Hash", hash); var content = client.DownloadString(response_url); // Create the Json serializer and parse the response DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(PaymentResponse)); using (var ms = new MemoryStream(Encoding.Unicode.GetBytes(content))) { var pmtData = (PaymentResponse)serializer.ReadObject(ms); if (pmtData.ResponseCode == "00") { INISubcriberExtraDetail iniSubExtDetails = db.INISubcriberExtraDetails.Single(s => s.transaction_Id == txnref); iniSubExtDetails.PaymentStatus = "Paid"; iniSubExtDetails.INI_Status = "ACTIVE"; iniSubExtDetails.BEstatus = "Active"; iniSubExtDetails.Transaction_date = Convert.ToDateTime(pmtData.TransactionDate); iniSubExtDetails.Amounts = Convert.ToInt32(apprAmt); iniSubExtDetails.Amounts /= 100; //check if the new member has a sponsor so that we can give the sponsor bonus if (!string.IsNullOrEmpty(iniSubExtDetails.My_Sponsor_Referral_Code)) { //retrieve the sponsor of this new member details from the users table var sponsor = db.Users.Single(sp => sp.MyRefferalCode.ToString() == iniSubExtDetails.My_Sponsor_Referral_Code); //check if sponsor is an ihealth networking subscriber, so dt we can give him credit var sp_IN_mlm = db.INISubcriberExtraDetails.Single(sp => sp.User.Id == sponsor.Id); try { //this check if the sponsor of this new member subscribe for ING promotion target //if yes, we give the sponsor a promo credit for his/her referral within the promo //period, ELSE, nothin is added but noth withstanding the dl size of the sponsor // still increases./ if (sp_IN_mlm.Promotional_Target_Subscription_Status == "Active") { sp_IN_mlm.promo_dl_size = sp_IN_mlm.promo_dl_size + 1; } else { sp_IN_mlm.Non_promo_dl_size = sp_IN_mlm.Non_promo_dl_size + 1; } sp_IN_mlm.Total_dl_Size = sp_IN_mlm.Total_dl_Size + 1; sp_IN_mlm.Most_recent_DL_Reg_date = DateTime.UtcNow; await db.SaveChangesAsync(); } catch (Exception ex) { throw ex; } referral_BonusTb refbonus = new referral_BonusTb(); refbonus.user_ID = sponsor.Id; refbonus.Downline_Id = iniSubExtDetails.User.MyRefferalCode; refbonus.Downline_Name = iniSubExtDetails.User.FirstName + " " + iniSubExtDetails.User.LastName; refbonus.Bonus_Type = "Ihealth Networking Referral Bonus"; refbonus.Subscription_Fee = iniSubExtDetails.Amounts; refbonus.Bonus = refbonus.Subscription_Fee * 0.5; // bonus is 50% of the subscription //refbonus.totalBonus = refbonus.totalBonus + refbonus.Bonus; refbonus.Bonus_created_date = DateTime.UtcNow; //check if the sponsor of this new member is currently subscribe to ING promo target if (sp_IN_mlm.Promotional_Target_Subscription_Status == "Active") { refbonus.promo_period_bonus = true; } db.referral_bonus_tb.Add(refbonus); await db.SaveChangesAsync(); sp_IN_mlm.CurrentBonus = sp_IN_mlm.CurrentBonus + (refbonus.Subscription_Fee * 0.5); await db.SaveChangesAsync(); } await db.SaveChangesAsync(); var iswtb = db.InterswtichTransactionsTables.Single(s => s.Transaction_Id == txnref); iswtb.Transaction_ResponseCode = pmtData.ResponseCode; iswtb.Transaction_Response = pmtData.ResponseDescription; await db.SaveChangesAsync(); StringBuilder sb = new StringBuilder(); //Assign user to Role if not already added var u = UserManager.FindById(iniSubExtDetails.User.Id); //this next lines of code delete the newly upgraded user details from IhealthUserMLM table //Note: the ihealthUserMLM table is the tb that store normal users downlines size IHealthUsersMLM delUserFromThisTable = await db.IHealthUsersMLM.FindAsync(u.Id); db.IHealthUsersMLM.Remove(delUserFromThisTable); await db.SaveChangesAsync(); //this next line of codes modify upgrading user roles from User to INIsubscribers var uOldRoleID = u.Roles.SingleOrDefault().RoleId; var uOldRoleName = db.Roles.SingleOrDefault(r => r.Id == uOldRoleID).Name; if (uOldRoleName != "INIsubscribers") { UserManager.RemoveFromRole(u.Id, uOldRoleName); var addrole = await UserManager.AddToRoleAsync(u.Id, "INIsubscribers"); } await SignInManager.SignInAsync(iniSubExtDetails.User, isPersistent : false, rememberBrowser : false); string code = await UserManager.GenerateEmailConfirmationTokenAsync(iniSubExtDetails.User.Id); var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = iniSubExtDetails.User.Id, code = code }, protocol: Request.Url.Scheme); await UserManager.SendEmailAsync(iniSubExtDetails.User.Id, "Confirm your account", em.Notification_Email_Body_Creator(iniSubExtDetails.User.FullName, "<div><p style=\" font-size: large\">Welcome to iHealth Networking Group, please kindly confirm your account by clicking on this <a href=\"" + callbackUrl + "\"> here.</a><br/><br/>Thanks for registering with us.<br/><br/> Best Regards, <br/><br/>iHealth Nigeria GSFM Team.</p></div>")); ViewBag.tRef = txnref; ViewBag.pRef = pmtData.PaymentReference; ViewBag.Message = sb.Append("<span style=\"color:green\">Awesome !!!</span> You have Successfully SIGN UP for <b>iHEALTH NETWORKING INSURANCE</b>. kindly," + "Check your <span style=\"color:Red\">email inbox OR spam folder</span> to confirm your account within 24 hours.<strong> You must be confirmed " + "before you can log in.<strong>").ToString(); AuthenticationManager.SignOut(); Session.Clear(); return(View("payment_Status")); } else { var iswtb = db.InterswtichTransactionsTables.Single(s => s.Transaction_Id == txnref); iswtb.Transaction_Response = pmtData.ResponseDescription; iswtb.Transaction_ResponseCode = pmtData.ResponseCode; await db.SaveChangesAsync(); INISubcriberExtraDetail inidetatils = db.INISubcriberExtraDetails.Single(s => s.transaction_Id == txnref); if (inidetatils.PaymentStatus != "Paid") { //remove about to registered member from the Ihealth Netwoorking community, since they refuse to pay online db.INISubcriberExtraDetails.Remove(inidetatils); await db.SaveChangesAsync(); ViewBag.responseMsg = pmtData.ResponseDescription; ViewBag.tRef = txnref; ViewBag.pRef = pmtData.PaymentReference; ViewBag.partial = "_PaymentFail"; AuthenticationManager.SignOut(); Session.Clear(); return(View("payment_Status")); } else { return(RedirectToAction("index", "home")); } } } } catch (Exception ex) { throw ex; } }
public async Task <JsonResult> ApprovePayment(IEnumerable <string> markAsPaidbyId) { try { #region if (markAsPaidbyId != null) { if (markAsPaidbyId.Count() > 0) { foreach (var id in markAsPaidbyId) { var usrpaid = db.premium_user.Single(u => u.premiumUserId == id); //check if the premium client's email already exist in registered users table is an ING member var is_Premium_User_Registered_in_all_user_db = db.Users.Where(u => u.Email.Equals(usrpaid.Email, StringComparison.CurrentCultureIgnoreCase)); if (is_Premium_User_Registered_in_all_user_db.Count() <= 0) { Random rd = new Random(); int myReferralCode = rd.Next(10000000); var userManager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(db)); var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(db)); PasswordHasher pdH = new PasswordHasher(); AlphaNumGen anGen = new AlphaNumGen(); string password = anGen.GetPassword(); string username = string.Concat(usrpaid.First_Name.Substring(0, 1), usrpaid.Last_Name); var RefUrl = this.Url.Action("Register", "Account", new { sp = username }, this.Request.Url.Scheme); ApplicationUser rgUser = new ApplicationUser(); rgUser.FirstName = usrpaid.First_Name; rgUser.LastName = usrpaid.Last_Name; rgUser.Email = usrpaid.Email; rgUser.PhoneNumber = usrpaid.Phone; rgUser.Address = usrpaid.Address; rgUser.City = usrpaid.City; rgUser.State = usrpaid.State; rgUser.Gender = usrpaid.Gender; rgUser.Health_Service_Provider = "No"; rgUser.isClientBooster = false; rgUser.UserType = "BusinessUser"; rgUser.NotifyStatus = 1; rgUser.Nationality = usrpaid.Nationality; rgUser.MyRefferalCode = myReferralCode; rgUser.subscriptionType = "Health_Insurance"; rgUser.UserName = username; rgUser.Refferal_Url = RefUrl; rgUser.PasswordHash = pdH.HashPassword(password); rgUser.SecurityStamp = Guid.NewGuid().ToString(); rgUser.RegDate = DateTime.UtcNow; rgUser.EmailConfirmed = true; db.Users.Add(rgUser); await db.SaveChangesAsync(); rgUser = userManager.FindByName(rgUser.UserName); if (rgUser != null) { var addtorole = userManager.AddToRole(rgUser.Id, "Users"); } IHealthUsersMLM iHmlm = new IHealthUsersMLM(); iHmlm.UserID = rgUser.Id; iHmlm.MyRefferalCode = myReferralCode; iHmlm.MySponsorRefCode = usrpaid.sponsorID.ToString(); iHmlm.MyDownlineCount = 0; db.IHealthUsersMLM.Add(iHmlm); await db.SaveChangesAsync(); #region //Confirm payment usrpaid.PaymentStatus = "Paid"; usrpaid.Transaction_date = DateTime.UtcNow; usrpaid.SignedBy = Session["Name"].ToString(); usrpaid.NotifyStatus = 1; // usrpaid.INISubcriberExtraDetails.MaxDT2MtTarget = DateTime.UtcNow.AddDays(30); await db.SaveChangesAsync(); //check if the new member has a sponsor so that we can give the sponsor bonus if (usrpaid.sponsorID != 0) { //retrieve the sponsor of this new registrant details from the all users table var sponsor = db.Users.Single(u => u.MyRefferalCode.ToString() == usrpaid.sponsorID.ToString()); //check if sponsor is an ihealth networking subscriber, so dt we can give him credit var sp_IN_mlm = db.INISubcriberExtraDetails.Single(sp => sp.User.Id == sponsor.Id); referral_BonusTb refbonus = new referral_BonusTb(); refbonus.user_ID = sponsor.Id; // refbonus.Downline_Id = usrpaid.INISubcriberExtraDetails.User.MyRefferalCode; refbonus.Downline_Name = usrpaid.First_Name + " " + usrpaid.Last_Name; refbonus.Bonus_Type = "Premium Referral Bonus"; refbonus.Subscription_Fee = usrpaid.Amount; refbonus.Bonus_created_date = DateTime.UtcNow; refbonus.Bonus = refbonus.Subscription_Fee * 0.05; // bonus is 5% of the subscription db.referral_bonus_tb.Add(refbonus); await db.SaveChangesAsync(); sp_IN_mlm.CurrentBonus = sp_IN_mlm.CurrentBonus + (refbonus.Subscription_Fee * 0.05); await db.SaveChangesAsync(); } string mailbody = "<p>We are glad to let you know that your payment for iHealth premium user package has been acknowledged.</p> " + "<p>Kindly note that we will batch and forward your details to the assigned HMO to activate your plan.</p>" + "<p>We will notify you via email, once your plan becomes active.</p>" + "<p>Kindly, note that a user account has also been created for you on our platform. Below are your login credentials;<br/>" + "<b> Username: "******" <br/> Password: "******"</b></p>" + "<p>Thank you. <br/><br/>Best Regards, <br/><br/>iHealthGSFM Team.</p>"; await em.premiumUserPaymentApprovalMail(usrpaid.Email, usrpaid.Last_Name, "Premium Plan Payment Approval", mailbody); TempData["success"] = "Operations Successfull"; #endregion } else { #region //confirm payment usrpaid.PaymentStatus = "Paid"; usrpaid.Transaction_date = DateTime.UtcNow; usrpaid.SignedBy = Session["Name"].ToString(); usrpaid.NotifyStatus = 1; // usrpaid.INISubcriberExtraDetails.MaxDT2MtTarget = DateTime.UtcNow.AddDays(30); await db.SaveChangesAsync(); //check if the new member has a sponsor so that we can give the sponsor bonus if (usrpaid.sponsorID != 0) { //retrieve the sponsor of this new registrant details from the all users table var sponsor = db.Users.Single(u => u.MyRefferalCode.ToString() == usrpaid.sponsorID.ToString()); //check if sponsor is an ihealth networking subscriber, so dt we can give him credit var sp_IN_mlm = db.INISubcriberExtraDetails.Single(sp => sp.User.Id == sponsor.Id); referral_BonusTb refbonus = new referral_BonusTb(); refbonus.user_ID = sponsor.Id; // refbonus.Downline_Id = usrpaid.INISubcriberExtraDetails.User.MyRefferalCode; refbonus.Downline_Name = usrpaid.First_Name + " " + usrpaid.Last_Name; refbonus.Bonus_Type = "Premium Referral Bonus"; refbonus.Subscription_Fee = usrpaid.Amount; refbonus.Bonus_created_date = DateTime.UtcNow; refbonus.Bonus = refbonus.Subscription_Fee * 0.05; // bonus is 5% of the subscription db.referral_bonus_tb.Add(refbonus); await db.SaveChangesAsync(); sp_IN_mlm.CurrentBonus = sp_IN_mlm.CurrentBonus + (refbonus.Subscription_Fee * 0.05); await db.SaveChangesAsync(); } string mailbody = "<p>We are glad to let you know that your payment for iHealth premium user package has been acknowledged.</p> " + "<p>Kindly note that we will batch and forward your details to the assigned HMO to activate your plan.</p>" + "<p>We will notify you via email, once your plan becomes active.</p>" + "<p>Thank you. <br/><br/>Best Regards, <br/><br/>iHealthGSFM Team.</p>"; await em.premiumUserPaymentApprovalMail(usrpaid.Email, usrpaid.Last_Name, "Premium Plan Payment Approval", mailbody); TempData["success"] = "Operations Successfull"; #endregion } } return(Json(true, JsonRequestBehavior.AllowGet)); } else { TempData["error"] = "Oops! No Item is selected from the list. "; return(Json(false, JsonRequestBehavior.AllowGet)); } } else { TempData["error"] = "Oops! No Item is selected from the list. "; return(Json(false, JsonRequestBehavior.AllowGet)); } #endregion } catch (Exception) { throw; } }
public async Task <ActionResult> UgradeForm(UpgradeFormViewModel model, FormCollection f) { string username = Session["Id"].ToString(); var usr = UserManager.FindById(username); if (usr == null) { return(HttpNotFound("Requested user not found")); } #region try { Random rd = new Random(); int trackId = rd.Next(10000000); var response = Request["g-recaptcha-response"]; // const string secret = "6LeP9hETAAAAAPhx2dmOL4eB6euPe_hLvOw1UaBH"; string secret = System.Configuration.ConfigurationManager.AppSettings["recaptchaPrivateKey"]; var client = new WebClient(); var reply = client.DownloadString( string.Format("https://www.google.com/recaptcha/api/siteverify?secret={0}&response={1}", secret, response)); var captchaResponse = JsonConvert.DeserializeObject <reCaptchaClass>(reply); StringBuilder sb = new StringBuilder(); if (ModelState.IsValid) { //int profVal = Convert.ToInt32(f["Profession"]); //var prof = await db.Profession.FindAsync(profVal); if (!captchaResponse.Success) { if (captchaResponse.ErrorCodes.Count <= 0) { return(View()); } ; var error = captchaResponse.ErrorCodes[0].ToLower(); switch (error) { case ("missing-input-secret"): ViewBag.Message = "The secret parameter is missing."; break; case ("invalid-input-secret"): ViewBag.Message = "The secret parameter is invalid or malformed."; break; case ("missing-input-response"): ViewBag.Message = "The response parameter is missing."; break; case ("invalid-input-response"): ViewBag.Message = "The response parameter is invalid or malformed."; break; default: ViewBag.Message = "Error occured. Please try again"; break; } ModelState.AddModelError("", "You did not type the verification word correctly. Please try again."); } else { string Username = usr.UserName; //the REFURL stores the newly registering User Unique URL which he or She can Share with Others to // register on Ihealth Networking Insurance var RefUrl = this.Url.Action("INIRegform", "Account", new { sp = Username }, this.Request.Url.Scheme); //var con3ID = Convert.ToInt32(f["Country"]); //var con3 = await db.country.FindAsync(con3ID); //var st_Id = Convert.ToInt32(f["State"]); //var st = await db.State.FindAsync(st_Id); usr.RegDate = DateTime.UtcNow; usr.NotifyStatus = 0; usr.Gender = model.Gender; //usr.Nationality = con3.CountryName; //usr.State = st.StateName; usr.Refferal_Url = RefUrl; usr.UserType = "INISubcriber"; usr.EmailConfirmed = false; //this method Update Normal user records who is upgrading to ING Subcriber status var result = await UserManager.UpdateAsync(usr); if (result.Succeeded) { INISubcriberExtraDetail iniSubExtDetails = new INISubcriberExtraDetail(); // If Newly registering Subcriber has a sponsor if (f["RefCode"] != "") { int SpCode = Convert.ToInt32(f["RefCode"]); //Retrieve sponsor Tracking ID var Sponsor = db.Users.First(u => u.MyRefferalCode == SpCode); //Add newly registering Subscriber to INISubscriberExtraDetails tb along with sponsor refcode iniSubExtDetails.My_Sponsor_Referral_Code = SpCode.ToString(); ////check if sponsor already exist in d iniSubExtDetails tb, so dt we can give him credit //var sp_IN_mlm = db.INISubcriberExtraDetails.Where(sp => sp.User.Id == Sponsor.Id); //if (sp_IN_mlm.Count() > 0) //{ // try // { // INISubcriberExtraDetail spIniSubExtDetails = db.INISubcriberExtraDetails.First(sp => sp.User.Id == Sponsor.Id); // //this check if the sponsor of this new member subscribe for ING promotion target // //if yes, we give the sponsor a promo credit for his/her referral within the promo // //period, ELSE, nothin is added but noth withstanding the dl size of the sponsor // // still increases./ // if (spIniSubExtDetails.Promotional_Target_Subscription_Status == "Active") // { // spIniSubExtDetails.promo_dl_size = spIniSubExtDetails.promo_dl_size + 1; // } // spIniSubExtDetails.Total_dl_Size = spIniSubExtDetails.Total_dl_Size + 1; // spIniSubExtDetails.Most_recent_DL_Reg_date = DateTime.UtcNow.Date; // await db.SaveChangesAsync(); // } // catch (Exception ex) // { // throw ex; // } //} //// Session["sp"] = null; } // If Newly registering Subcriber does not have sponsor // Newly registering Subscriber is added to INISubcriberExtraDetail tb where sponsor id is null if (f["PaymentOptions"] == "PayToBank") { iniSubExtDetails.UserID = usr.Id; iniSubExtDetails.paymentMethod = f["PaymentOptions"]; iniSubExtDetails.transaction_Id = string.Concat("ING-", rd.Next(999999)); //Payment status is set to pending until the user payment has been confirm from banks. iniSubExtDetails.PaymentStatus = "Pending"; iniSubExtDetails.INI_Status = "InActive"; iniSubExtDetails.BEstatus = "InActive"; //if (f["BenefitCategory"] == "CarreerBenefit") //{ iniSubExtDetails.BenefitCategory = "CarreerBenefit"; // iniSubExtDetails.MaxDT2MtTarget = DateTime.UtcNow.AddDays(90); //} //else //{ // iniSubExtDetails.BenefitCategory = f["BenefitCategory"]; // iniSubExtDetails.CurrentStage = "Starter"; // iniSubExtDetails.Stage1Benefit = "No Benefit"; // iniSubExtDetails.Stage2Benefit = "No Benefit"; // iniSubExtDetails.Stage3Benefit = "No Benefit"; // iniSubExtDetails.Stage4Benefit = "No Benefit"; // iniSubExtDetails.Stage5Benefit = "No Benefit"; //} iniSubExtDetails.CurrentBenefit = "No Benefit"; iniSubExtDetails.Total_dl_Size = 0; db.INISubcriberExtraDetails.Add(iniSubExtDetails); await db.SaveChangesAsync(); // After Payment has been made and confirm by Ihealth official the Payment status is set to Paid //Assign user to Role if not already added var u = UserManager.FindById(usr.Id); //this next lines of code delete the newly upgraded user details from IhealthUserMLM table //Note: the ihealthUserMLM table is the tb that store normal users downlines size IHealthUsersMLM delUserFromThisTable = await db.IHealthUsersMLM.FindAsync(u.Id); db.IHealthUsersMLM.Remove(delUserFromThisTable); await db.SaveChangesAsync(); //this next line of codes modify upgrading user roles from User to INIsubscribers var uOldRoleID = u.Roles.SingleOrDefault().RoleId; var uOldRoleName = db.Roles.SingleOrDefault(r => r.Id == uOldRoleID).Name; if (uOldRoleName != "INIsubscribers") { UserManager.RemoveFromRole(u.Id, uOldRoleName); var addrole = await UserManager.AddToRoleAsync(u.Id, "INIsubscribers"); } await UserManager.SendEmailAsync(usr.Id, "Ihealth Networking Group", em.Notification_Email_Body_Creator(usr.FullName, "<h2>WELCOME TO IHEALTH NETWORKIING GROUP<h2/>" + " <p>Thank you for signing up for IHEALTH NETWORKING GROUP.</p> " + "<p>But you are not yet activated. Kindly, pay into the account below:-<br/>" + "ACCOUNT NUMBER: " + acctno + "<br/>ACCOUNT NAME: " + AcctName + "<br/> BANK:" + bankName + " <br/>" + "</p><p>After payment is made, kindly email the information below to <a href=\"mailto:[email protected]\">[email protected]</a><br/> (a) Name of Depositor <br/>" + "(b)Teller Number <br/>(c)Your Membership ID: " + usr.MyRefferalCode + " <br/> (d) Amount <br/> (e) Date of Payment</p><br/> Thanks for registering with us<br/><br/>Best Regards, <br/><br/> iHealth Nigeria GSFM Team.")); ViewBag.Message = sb.Append("<span style=\"color:green\">Awesome !!!</span> You have Successfully <br/>SIGN UP for <b>iHEALTH NETWORKING <br/> GROUP</b>.kindly," + " Check your <span style=\"color:Red\">email inbox OR <br/> spam folder</span> for more information ").ToString(); AuthenticationManager.SignOut(); Session.Clear(); return(View("Info")); } else { iniSubExtDetails.UserID = usr.Id; iniSubExtDetails.paymentMethod = f["PaymentOptions"]; iniSubExtDetails.transaction_Id = string.Concat("ING-", rd.Next(999999)); iniSubExtDetails.PaymentStatus = "Pending"; iniSubExtDetails.INI_Status = "InActive"; iniSubExtDetails.BEstatus = "InActive"; iniSubExtDetails.paymentMethod = f["PaymentOptions"]; iniSubExtDetails.paymentGateway = "Interswitch"; iniSubExtDetails.CurrentBenefit = "No Benefit"; iniSubExtDetails.Total_dl_Size = 0; iniSubExtDetails.BenefitCategory = "CarreerBenefit"; db.INISubcriberExtraDetails.Add(iniSubExtDetails); await db.SaveChangesAsync(); InterswitchTransactionsTB iswtb = new InterswitchTransactionsTB(); iswtb.Client_Name = usr.FirstName; iswtb.Client_Email = usr.Email; iswtb.Transaction_Amount = amount.ToString(); iswtb.Transaction_date = DateTime.Now.Date; iswtb.Transaction_purpose = "Ihealth Networking Group Subscription"; iswtb.Transaction_Id = iniSubExtDetails.transaction_Id; db.InterswtichTransactionsTables.Add(iswtb); await db.SaveChangesAsync(); TempData["cust_id"] = usr.Id; TempData["Amount"] = amount; TempData["trans_id"] = iniSubExtDetails.transaction_Id; TempData["cust_name"] = usr.FullName; return(Redirect("/PaymentGateways/upgradeGateway")); } } AddErrors(result); } } return(View(new UpgradeFormViewModel { FirstName = usr.FirstName, LastName = usr.LastName, Email = usr.Email, PhoneNumber = usr.PhoneNumber, Username = usr.UserName, })); } catch (Exception ex) { throw ex; } #endregion }