public IActionResult DoTransaction(IFormCollection fc) { try { var tpin = Convert.ToString(fc["digit1"]) + Convert.ToString(fc["digit2"]) + Convert.ToString(fc["digit3"]) + Convert.ToString(fc["digit4"]) + Convert.ToString(fc["digit5"]) + Convert.ToString(fc["digit6"]) + Convert.ToString(fc["digit7"]) + Convert.ToString(fc["digit8"]); var listAddtionParam = new List <AdditonalParam>(); var sessionUtility = new SessionUtility(); var inputData = JsonConvert.DeserializeObject <List <InputParamsRes> >(sessionUtility.GetStringSession("InputParams")); if (inputData != null) { if (inputData.Count > 1) { for (int i = 1; i < listAddtionParam.Count; i++) { listAddtionParam.Add(new AdditonalParam { key = inputData[i].columnMapping, value = inputData[i].UserInput }); } } } var fetchResult = JsonConvert.DeserializeObject <BillFetchRes>(sessionUtility.GetStringSession("FetchBillData")); decimal billAmount = 0; if (Convert.ToString(fc["Amount"]) != null) { billAmount = Convert.ToDecimal(fc["Amount"]); } else { billAmount = Convert.ToDecimal(fetchResult.addinfo.bill_amount); } var req = new { customerId = sessionUtility.GetLoginSession().customerId, rechageNumber = Convert.ToString(inputData[0].UserInput), txnAmount = Convert.ToDecimal(billAmount), serviceProviderId = Convert.ToInt32(sessionUtility.GetStringSession("ServiceProviderId")), serviceCircleId = 1, serviceChannelId = 2, remarks = "BBPS", tPin = new PasswordHash().HashShA1(tpin), addlParameters = listAddtionParam }; string errorMessage = string.Empty; var response = new CallService().PostTransaction <TransactionResult>("doRecharge", req, ref errorMessage); return(PartialView("AckView", response)); } catch (Exception) { } return(PartialView()); }
public IActionResult SubmitPAN(IFormCollection fc) { string mobileNumber = string.Empty; string redirectUrl = string.Empty; try { var sessionUtility = new SessionUtility(); mobileNumber = sessionUtility.GetStringSession("BoardedMobile"); var additionalData = new AdditionalParam { Name = sessionUtility.GetStringSession("BoardingName"), FatherName = sessionUtility.GetStringSession("BoardingFatherName"), PanPhoto = sessionUtility.GetStringSession("PanImageURL"), PanNumber = sessionUtility.GetStringSession("BoardingPAN"), BoardingId = sessionUtility.GetStringSession("BoardingId"), DateOfBirth = sessionUtility.GetStringSession("BoardingDob"), MobileNumber = sessionUtility.GetStringSession("BoardedMobile") }; redirectUrl = Startup.AppSetting["AadharOTP_RedirectURL"] + "?mob=" + mobileNumber + "&targetUrl=" + Startup.AppSetting["Aadhar_ReturnBackURL"] + "&additionalParmJson=" + JsonConvert.SerializeObject(additionalData); } catch (Exception) { } return(Json(new { success = true, redirect_url = redirectUrl })); }
public IActionResult BankDetails(IFormCollection fc) { try { var bankName = Convert.ToString(fc["ddlBank"]); var bankAccount = Convert.ToString(fc["bankaccount"]); string bankIFSCCode = Convert.ToString(fc["bankifsccode"]); var sessionUtility = new SessionUtility(); var allBasicDetails = JsonConvert.DeserializeObject <AllBasicDetailsInput>(sessionUtility.GetStringSession("AllBasicDetails")); var mainDetails = JsonConvert.DeserializeObject <SetAllValue>(sessionUtility.GetStringSession("MainDetails")); mainDetails.BankName = bankName; mainDetails.BankAccount = bankAccount; mainDetails.BankIFSCCode = bankIFSCCode; sessionUtility.SetSession("MainDetails", JsonConvert.SerializeObject(mainDetails)); mainDetails.BankName = bankName.Split("~")[1]; var overviewDtls = new OverviewDetails(); allBasicDetails.personalDetails.Gender = allBasicDetails.personalDetails.Gender.Split("~")[1]; allBasicDetails.personalDetails.MaritialStatus = allBasicDetails.personalDetails.MaritialStatus.Split("~")[1]; overviewDtls.allDetails = allBasicDetails; overviewDtls.allValue = mainDetails; return(PartialView("AllDetails", overviewDtls)); } catch (Exception) { } return(PartialView("AllDetails")); }
public IActionResult GetPaymentReqFields(IFormCollection fc) { try { var sessionUtility = new SessionUtility(); var listParam = new List <KeyValuePair <string, string> >(); listParam.Add(new KeyValuePair <string, string>("bankId", fc["bankId"])); sessionUtility.SetSession("bankId", fc["bankId"]); sessionUtility.SetSession("bankName", fc["bankName"]); sessionUtility.SetSession("ifscCode", Convert.ToString(fc["ifscCode"])); listParam.Add(new KeyValuePair <string, string>("paymentModeId", sessionUtility.GetStringSession("paymentModeId"))); string errorMessage = string.Empty; var response = new CallService().GetResponse <List <RequestInputRes> >("getPaymentReqFieldMapping", listParam, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { var viewModel = new RequestViewModel(); viewModel.reqList = response; sessionUtility.SetSession("RequestInput", JsonConvert.SerializeObject(response)); return(PartialView("RequestField", viewModel)); } } catch (Exception) { } return(PartialView("RequestField")); }
public IActionResult PaymentTransfer(ShowProfile inputReq) { try { var sessionUtility = new SessionUtility(); string errorMessage = string.Empty; var req = new { payerMobileNumber = sessionUtility.GetLoginSession().mobileNumber, payeeMobileNumber = Convert.ToInt64(sessionUtility.GetStringSession("PayeeMobileNo")), transferAmount = Convert.ToInt64(sessionUtility.GetStringSession("PayeeAmount")), transferType = 0, transactionRequestedBy = sessionUtility.GetLoginSession().customerId, serviceChannelId = 1, transactionRemarks = inputReq.Remarks }; var response = new CallService().PostResponse <string>("PaymentTransfer", req, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { var ackResp = new PaymentTransferAck { PayeeMobileNumber = sessionUtility.GetStringSession("PayeeMobileNo"), PayeeWalletBal = Convert.ToString(new WalletDetails().GetBalanceByCustomerID(sessionUtility.GetStringSession("PayeeCustomerID"))), Amount = sessionUtility.GetStringSession("PayeeAmount"), PayeeName = sessionUtility.GetStringSession("PayeeName"), StatusId = 1, Status = "Successfully Transferred." }; return(PartialView("AckView", ackResp)); } else { var ackResp = new PaymentTransferAck { PayeeMobileNumber = sessionUtility.GetStringSession("PayeeMobileNo"), PayeeWalletBal = Convert.ToString(new WalletDetails().GetBalanceByCustomerID(sessionUtility.GetStringSession("PayeeCustomerID"))), Amount = sessionUtility.GetStringSession("PayeeAmount"), PayeeName = sessionUtility.GetStringSession("PayeeName"), StatusId = 0, Status = errorMessage }; return(PartialView("AckView", ackResp)); } } catch (Exception ex) { return(Json(new { success = false, errorMessage = ex.Message })); } }
public SetAllValue GetAllValues() { try { var sessionUtility = new SessionUtility(); var setValues = new SetAllValue(); setValues.FullName = sessionUtility.GetStringSession("BoardingName"); setValues.FatherName = sessionUtility.GetStringSession("BoardingFatherName"); setValues.DateOfBirth = sessionUtility.GetStringSession("BoardingDob"); setValues.MobileNumber = sessionUtility.GetStringSession("BoardedMobile"); var aadharData = sessionUtility.GetStringSession("Aadhar_Details"); var aadharDetails = JsonConvert.DeserializeObject <AadharOTPRes>(aadharData); setValues.FullName = aadharDetails.original_kyc_info.name; setValues.Address = aadharDetails.original_kyc_info.address; setValues.City = aadharDetails.original_kyc_info.dist; setValues.State = aadharDetails.original_kyc_info.state; new SessionUtility().SetSession("MainDetails", JsonConvert.SerializeObject(setValues)); return(setValues); } catch (Exception) { } return(null); }
public IActionResult SubmitAddressProof(IFormCollection fc) { try { var sessionUtility = new SessionUtility(); var aadharData = sessionUtility.GetStringSession("Aadhar_Details"); var aadharDetails = JsonConvert.DeserializeObject <AadharOTPRes>(aadharData); aadharDetails.original_kyc_info.mobile = string.IsNullOrEmpty(aadharDetails.original_kyc_info.mobile) ? sessionUtility.GetStringSession("BoardedMobile") : aadharDetails.original_kyc_info.mobile; var getValue = GetAllValues(); return(Json(new { success = true, responseData = aadharDetails.original_kyc_info })); } catch (Exception) { } return(Json(new { success = false })); }
public IActionResult TransferStock(ShowProfile input) { try { var sessionUtility = new SessionUtility(); string errorMessage = string.Empty; var req = new { parentMobileNumber = sessionUtility.GetLoginSession().mobileNumber, childMobileNumber = Convert.ToInt64(sessionUtility.GetStringSession("PayeeMobileNo")), stockTypeId = Convert.ToInt32(sessionUtility.GetStringSession("StockTypeId")), stockCount = Convert.ToInt32(sessionUtility.GetStringSession("PayeeNumberOfStock")), tpin = new PasswordHash().HashShA1(input.TPIN)//input.TPIN // new PasswordHash().HashShA1(input.TPIN) }; var response = new CallService().PostResponse <string>("putCustomerStockTransafer", req, ref errorMessage); var resp = new PaymentManagement.Models.PaymentTransferAck() { PayeeMobileNumber = sessionUtility.GetStringSession("PayeeMobileNo"), PayeeName = sessionUtility.GetStringSession("PayeeName"), Amount = sessionUtility.GetStringSession("PayeeNumberOfStock"), PayeeWalletBal = Convert.ToString(new PayInc_Customer_web.Models.WalletDetails().GetBalanceByCustomerID(sessionUtility.GetStringSession("PayeeCustomerID"))), }; if (string.IsNullOrEmpty(errorMessage)) { resp.Status = "Stock transferred."; resp.StatusId = 1; } else { resp.Status = errorMessage; resp.StatusId = 0; } return(PartialView("AckView", resp)); } catch (Exception) { } return(PartialView("AckView")); }
public IActionResult CaptureAadharPay(AEPSInput input) { try { var sessionUtility = new SessionUtility(); var pidData = new PidData(); XmlSerializer serializer = new XmlSerializer(typeof(PidData)); using (TextReader reader = new StringReader(input.PidData)) { pidData = (PidData)serializer.Deserialize(reader); } var captureReq = new IciciCaptureInternalResponse { ci = pidData.Skey.Ci, dc = pidData.DeviceInfo.Dc, dpID = pidData.DeviceInfo.DpId, errCode = pidData.Resp.ErrCode, errInfo = pidData.Resp.ErrInfo, fCount = pidData.Resp.FCount, fType = pidData.Resp.FType, hmac = pidData.Hmac, iCount = "0", iType = "0", mc = pidData.DeviceInfo.Mc, mi = pidData.DeviceInfo.Mi, nmPoints = pidData.Resp.NmPoints, pCount = "0", Piddata = pidData.Data.Text, PidDatatype = pidData.Data.Type, pType = "0", qScore = pidData.Resp.QScore, rdsID = pidData.DeviceInfo.RdsId, rdsVer = pidData.DeviceInfo.RdsVer, sessionKey = pidData.Skey.Text, }; var allReqInput = new DetailsAepReq { accessModeType = "", adhaarNumber = input.AadharNumber, agentId = Convert.ToString(sessionUtility.GetStringSession("AEPSAgentID")), customerId = sessionUtility.GetLoginSession().customerId, customerNumber = input.CustomerNumber, deviceSerialNumber = pidData.DeviceInfo.Mi, deviceTransactionId = "", iciciAepsCaptureRes = captureReq, indicatorforUID = 0, ipAddress = "176.9.24.146", latitude = "26.125321647834", longitude = "78.09278884562441", merchantTransactionId = GetOrderID(), nbin = input.BankName, paymentType = "B", requestRemarks = "Aadhar Pay", serviceChannelId = 2, transactionAmount = Convert.ToInt32(input.Amount), transactionType = "MS", virtualId = string.Empty }; string errorMessage = string.Empty; var response = new CallService().PostResponse <AEPSResponse>("puticiciAepsMiniStatement", allReqInput, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { var response1 = new resAEPSTransaction(); response1.AadhaarNumber = input.AadharNumber; response1.Amount = Convert.ToDecimal(input.Amount); response1.ClientTransactionId = allReqInput.merchantTransactionId; response1.AEPSModeType = "Aadhar Pay"; response1.MobileNumber = input.CustomerNumber; return(PartialView("AckView", response1)); } else { var response1 = new resAEPSTransaction(); response1.AadhaarNumber = input.AadharNumber; response1.Amount = Convert.ToDecimal(input.Amount); response1.ClientTransactionId = allReqInput.merchantTransactionId; response1.AEPSModeType = "Mini Statement Web"; response1.MobileNumber = input.CustomerNumber; return(PartialView("AckView", response1)); } } catch (Exception) { } return(PartialView("AckView")); }
public IActionResult CaptureBalanceEnquiry(AEPSInput input) { try { input.AadharNumber = input.AadharNumber.Replace("-", "").ToString(); var sessionUtility = new SessionUtility(); var pidData = new PidData(); XmlSerializer serializer = new XmlSerializer(typeof(PidData)); using (TextReader reader = new StringReader(input.PidData)) { pidData = (PidData)serializer.Deserialize(reader); } if (pidData.Resp.ErrCode != "0") { return(Json(new { success = false, errorMessage = pidData.Resp.ErrInfo })); } var captureReq = new IciciCaptureInternalResponse { ci = pidData.Skey.Ci, dc = pidData.DeviceInfo.Dc, dpID = pidData.DeviceInfo.DpId, errCode = pidData.Resp.ErrCode, errInfo = pidData.Resp.ErrInfo, fCount = pidData.Resp.FCount, fType = pidData.Resp.FType, hmac = pidData.Hmac, iCount = "0", iType = "0", mc = pidData.DeviceInfo.Mc, mi = pidData.DeviceInfo.Mi, nmPoints = pidData.Resp.NmPoints, pCount = "0", Piddata = pidData.Data.Text, PidDatatype = pidData.Data.Type, pType = "0", qScore = pidData.Resp.QScore, rdsID = pidData.DeviceInfo.RdsId, rdsVer = pidData.DeviceInfo.RdsVer, sessionKey = pidData.Skey.Text, }; var allReqInput = new DetailsAepReq { accessModeType = "", adhaarNumber = input.AadharNumber, agentId = Convert.ToString(sessionUtility.GetStringSession("AEPSAgentID")), customerId = sessionUtility.GetLoginSession().customerId, customerNumber = input.CustomerNumber, deviceSerialNumber = pidData.DeviceInfo.Mi, deviceTransactionId = "", iciciAepsCaptureRes = captureReq, indicatorforUID = 0, ipAddress = "176.9.24.146", latitude = "26.125321647834", longitude = "78.09278884562441", merchantTransactionId = GetOrderID(), nbin = input.BankName, paymentType = "B", requestRemarks = "Balance Enquiry Web", serviceChannelId = 2, transactionAmount = 0, transactionType = "BE", virtualId = string.Empty }; var sting = JsonConvert.SerializeObject(allReqInput); string errorMessage = string.Empty; var response = new CallService().PostResponse <AEPSResponse>("puticiciAepsBalanceEnq", allReqInput, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { var response1 = new resAEPSTransaction(); response1.AadhaarNumber = "XXXXXXXXX" + input.AadharNumber.Substring(input.AadharNumber.ToString().Length - 4, 4);; response1.Amount = Convert.ToDecimal(input.Amount); response1.ClientTransactionId = allReqInput.merchantTransactionId; response1.TransactionReference = response.data.fpTransactionId; response1.AEPSModeType = "Balance Enquiry"; response1.MobileNumber = input.CustomerNumber; response1.BalanceAmount = Convert.ToDecimal(response.data.balanceAmount); response1.Status = 1; response1.BankReferenceNumber = input.BankName; response1.BankResponseMessage = response.data.transactionStatus; response1.ResponseMessage = "Successfully retrived"; return(PartialView("AckView", response1)); } else { var response1 = new resAEPSTransaction(); response1.AadhaarNumber = input.AadharNumber; response1.Amount = Convert.ToDecimal(input.Amount); response1.ClientTransactionId = allReqInput.merchantTransactionId; response1.AEPSModeType = "Balance Enquiry"; response1.MobileNumber = input.CustomerNumber; response1.BalanceAmount = 0; response1.Status = 0; response1.ResponseMessage = errorMessage; return(PartialView("AckView", response1)); } } catch (Exception ex) { Console.WriteLine(ex.Message); } return(PartialView("AckView")); }
public IActionResult UploadPancard() { try { if (Request.Form.Files != null) { var file = Request.Form.Files[0]; var filePath = Path.GetTempFileName(); if (file.Length > 0) { using (var ms = new MemoryStream()) { file.CopyTo(ms); var fileBytes = ms.ToArray(); string strBase64 = Convert.ToBase64String(fileBytes); var ext = Path.GetExtension(file.FileName); var parameter = new { fileCategory = "PAN", fileUniqueId = "PAN_CARD_" + System.DateTime.Now.Day + System.DateTime.Now.Minute + "_" + new Random().Next(1000, 9999), fileExtension = ext, base64String = strBase64 }; string s = Newtonsoft.Json.JsonConvert.SerializeObject(parameter); string errorMessage = string.Empty; var savedImageUrl = new CallService().PostImage("saveImageBase64", parameter, ref errorMessage); savedImageUrl = JsonConvert.DeserializeObject <string>(savedImageUrl); if (string.IsNullOrEmpty(errorMessage)) { var listParams = new List <KeyValuePair <string, string> >(); listParams.Add(new KeyValuePair <string, string>("getImages", savedImageUrl)); string errorPanMsg = string.Empty; var panExtractResponse = new CallService().GetResponse <Models.OnBoardingResp>("getSignzyPanExtraction", listParams, ref errorPanMsg); if (string.IsNullOrEmpty(errorPanMsg)) { if (string.IsNullOrEmpty(panExtractResponse.response.result.number)) { return(Json(new { success = false, errorMessage = "Invalid PAN CARD" })); } var responseParam = new { name = panExtractResponse.response.result.name, fatherName = panExtractResponse.response.result.fatherName, dob = panExtractResponse.response.result.dob, panNumber = panExtractResponse.response.result.number, imageUrl = savedImageUrl }; InsertCustomerKyc(1, responseParam.panNumber, null, savedImageUrl, 1, JsonConvert.SerializeObject(panExtractResponse), null, "Pan Card Response"); var sessionUtilty = new SessionUtility(); sessionUtilty.SetSession("PanImageURL", responseParam.imageUrl); sessionUtilty.SetSession("BoardingDob", panExtractResponse.response.result.dob); string checkMatchError = string.Empty; var fieldsInput = new { Field1 = sessionUtilty.GetStringSession("BoardingPAN"), Field2 = sessionUtilty.GetStringSession("BoardingFatherName"), FieldN = sessionUtilty.GetStringSession("BoardingName") }; var nameMatchResp = GetMatchTextPercentage(responseParam.imageUrl, fieldsInput, ref checkMatchError); if (string.IsNullOrEmpty(checkMatchError)) { var matchRes = new { PanNumber = nameMatchResp[0].Value, FatherName = nameMatchResp[1].Value, FullName = nameMatchResp[2].Value }; return(Json(new { success = true, responseData = responseParam, matchData = matchRes })); } return(Json(new { success = true, responseData = responseParam, matchData = "" })); } else { return(Json(new { success = false, errorMessage })); } } } } } return(Json(new { success = false, errorMessage = "Please select pancard image" })); } catch (Exception ex) { return(Json(new { success = false, errorMessage = ex.Message })); } }
public IActionResult GetVideoVerification() { try { var sessionUtility = new SessionUtility(); string tokenId = sessionUtility.GetStringSession("VideoToken"); var listParam = new List <KeyValuePair <string, string> >(); listParam.Add(new KeyValuePair <string, string>("task", tokenId)); string errorMessage = string.Empty; var response = new CallService().GetResponse <FinalVideoVerifyResp>("getSignzyGetVideoVerification", listParam, ref errorMessage); response = new CallService().GetResponse <FinalVideoVerifyResp>("getSignzyGetVideoVerification", listParam, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { response.PanImage = new SessionUtility().GetStringSession("PANCroppedUrl"); var allBasicDetails = JsonConvert.DeserializeObject <AllBasicDetailsInput>(sessionUtility.GetStringSession("AllBasicDetails")); var mainDetails = JsonConvert.DeserializeObject <SetAllValue>(sessionUtility.GetStringSession("MainDetails")); var panDOB = new DateTime(); int dob = 0; if (DateTime.TryParse(mainDetails.DateOfBirth, out panDOB)) { dob = Convert.ToInt32(Convert.ToDateTime(mainDetails.DateOfBirth).ToString("yyyyMMdd")); } if (sessionUtility.GetStringSession("isInserted") == null) { var areaOutletDetails = GetAddressByPinCode(allBasicDetails.basicInput.firmPinCode); var req = new { onboardingId = Convert.ToInt64(sessionUtility.GetStringSession("BoardingId")), dob = dob, emailId = allBasicDetails.personalDetails.EmailAddress, genderId = Convert.ToInt32(allBasicDetails.personalDetails.Gender.Split('~')[0]), maritalStatusId = Convert.ToInt32(allBasicDetails.personalDetails.MaritialStatus.Split('~')[0]), casteCategory = allBasicDetails.personalDetails.Caste, qualification = allBasicDetails.personalDetails.EducationalQualification, serviceProviderId = 1, physicalStatus = allBasicDetails.personalDetails.IsPhysicallyDisabled, occupationType = allBasicDetails.personalDetails.OccupationType, occupationDuration = "", entityType = allBasicDetails.personalDetails.EntityType, districtId = GetAddressByPinCode(allBasicDetails.addressDetails.pincode).districtId, areaId = Convert.ToInt32(allBasicDetails.addressDetails.areaId), pinCode = Convert.ToInt32(allBasicDetails.addressDetails.pincode), landmark = allBasicDetails.addressDetails.landmark, address = allBasicDetails.addressDetails.address, outletName = allBasicDetails.basicInput.firmname, outletCategoryId = 1, outletDistrictId = areaOutletDetails.districtId, outletAreaId = areaOutletDetails.areaId, outletPinCode = Convert.ToInt32(allBasicDetails.basicInput.firmPinCode), outletLandmark = allBasicDetails.basicInput.firmLandmark, outletAddress = allBasicDetails.basicInput.firmaddress, bankAccountTypeId = 1, bankId = Convert.ToInt32(mainDetails.BankName.Split('~')[0]), accountName = mainDetails.BankName, accountNumber = mainDetails.BankAccount, ifscCode = mainDetails.BankIFSCCode, customerKycStatusId = 2, updateBy = 0 }; string errorMessage1 = string.Empty; var insertKyc = new CallService().PostResponse <string>("putDetailsCustomerOnbBoardingKyc", req, ref errorMessage1); if (string.IsNullOrEmpty(errorMessage1)) { InsertCustomerKyc(10, null, null, null, 1, JsonConvert.SerializeObject(response), null, "Video Verifyication"); } sessionUtility.SetSession("isInserted", "true"); } return(View("Response", response)); } return(View("Response")); } catch (Exception) { } return(View("Response")); }
public IActionResult SubmitPaymentReq(RequestViewModel request) { try { var savedImageUrl = string.Empty; if (Request.Form.Files != null) { if (Request.Form.Files.Count > 0) { var file = Request.Form.Files[0]; var paramater = new Object(); if (file.Length > 0) { using (var ms = new MemoryStream()) { file.CopyTo(ms); var fileBytes = ms.ToArray(); string strBase64 = Convert.ToBase64String(fileBytes); var ext = Path.GetExtension(file.FileName); paramater = new { fileCategory = "PaySlip", fileUniqueId = "PaySlip_" + new Random().Next(1000, 9999), fileExtension = ext, base64String = strBase64 }; } } string errorMessage1 = string.Empty; savedImageUrl = new CallService().PostImage("saveImageBase64", paramater, ref errorMessage1); } } string errorMessage = string.Empty; var sessionUtility = new SessionUtility(); var requestInput = JsonConvert.DeserializeObject <List <RequestInputRes> >(sessionUtility.GetStringSession("RequestInput")); var reqParam = new SubmitPaymentReqInput { customerId = sessionUtility.GetLoginSession().customerId, requestedBy = sessionUtility.GetLoginSession().customerId, branchIFSCCode = sessionUtility.GetStringSession("ifscCode"), bankRefNo = "", paymentModeId = Convert.ToInt32(sessionUtility.GetStringSession("paymentModeId")), loadAmount = 0, loadCategoryId = 1, loadDescription = "", bankId = Convert.ToInt32(sessionUtility.GetStringSession("bankId")), loadDepositDate = null, serviceChannelId = 2, paymentSlipPath = savedImageUrl }; for (int i = 0; i < requestInput.Count; i++) { requestInput[i].UsersInput = request.reqList[i].UsersInput; } foreach (var item in requestInput) { if (item.columnMapping.Trim() == GetPropertyName(() => reqParam.bankRefNo)) { if (!string.IsNullOrEmpty(reqParam.bankRefNo)) { reqParam.bankRefNo = reqParam.bankRefNo + " | " + item.UsersInput.Trim(); } else { reqParam.bankRefNo = item.UsersInput.Trim(); } } if (item.columnMapping.Trim() == GetPropertyName(() => reqParam.loadDepositDate)) { reqParam.loadDepositDate = item.UsersInput.Trim(); } if (item.columnMapping.Trim() == "LoadAmount") { reqParam.loadAmount = Convert.ToInt32(item.UsersInput.Trim()); } if (item.columnMapping.Trim() == GetPropertyName(() => reqParam.branchIFSCCode)) { reqParam.branchIFSCCode = item.UsersInput.Trim(); } } var response = new CallService().PostResponse <string>("putDetailsLoadRequest", reqParam, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { var ackModel = new Acknowledgement() { BankRefNo = reqParam.bankRefNo, LoadAmount = reqParam.loadAmount, LoadDepositDate = reqParam.loadDepositDate, BankName = Convert.ToString(sessionUtility.GetStringSession("bankName")), LoadRequestId = Convert.ToInt32(response), Status = 1, StatusMessage = "Load Request Submitted" }; return(PartialView("AckView", ackModel)); } else { var ackModel = new Acknowledgement() { BankRefNo = reqParam.bankRefNo, LoadAmount = reqParam.loadAmount, LoadDepositDate = reqParam.loadDepositDate, BankName = Convert.ToString(sessionUtility.GetStringSession("bankName")), LoadRequestId = Convert.ToInt32(response), Status = 0, StatusMessage = "Failed! " + errorMessage }; return(PartialView("AckView", ackModel)); } } catch (Exception) { } return(PartialView("AckView")); }
public IActionResult FetchBill(List <InputParamsRes> input) { try { var sessionUtility = new SessionUtility(); var inputData = JsonConvert.DeserializeObject <List <InputParamsRes> >(sessionUtility.GetStringSession("InputParams")); for (int i = 0; i < inputData.Count; i++) { inputData[i].UserInput = input[i].UserInput; } sessionUtility.SetSession("InputParams", JsonConvert.SerializeObject(inputData)); var listParams = new List <KeyValuePair <string, string> >(); listParams.Add(new KeyValuePair <string, string>("ssCode", Convert.ToString(input[0].SSCode))); listParams.Add(new KeyValuePair <string, string>("caNumber", Convert.ToString(input[0].UserInput))); string errorMessage = string.Empty; var response = new CallService().GetResponse <BillFetchRes>("getSpecificStepBill", listParams, ref errorMessage); sessionUtility.SetSession("FetchBillData", JsonConvert.SerializeObject(response)); if (string.IsNullOrEmpty(errorMessage)) { return(PartialView(response)); } else { ViewBag.InputData = inputData; return(PartialView()); } } catch (Exception) { return(PartialView()); } }