public IActionResult PayNow1(int SessionId) { if (TempData["TutorModel"] != null) { UserCache userCache = JsonConvert.DeserializeObject <UserCache>(TempData["TutorModel"].ToString()); PaymentModel paymentModel = new PaymentModel { User = userCache.Extract() }; paymentModel.session = PaymentDB.GetSessionDetails(SessionId, paymentModel.User.UserId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); paymentModel.wallet = PaymentDB.GetWallet(paymentModel.User.UserId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); paymentModel.billingInfo = PaymentDB.GetBillingInfo(userCache.UserId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); TempData.Keep("TutorModel"); return(PartialView(paymentModel)); } return(PartialView(new PaymentModel())); }