public IActionResult BookComplaint(string txnId) { try { var sessionUtility = new SessionUtility(); var req = new { CustomerId = sessionUtility.GetLoginSession().customerId, CustomerName = sessionUtility.GetLoginSession().firstName, CustomerEmailId = "", AlternateMobileNumber = "", CustomerLanguageId = 1, TicketSubCategoryId = 2, TicketSourceId = 1, TicketChannelId = 2, TransactionId = txnId, CustomerRemark = "Book Complaint", BookedBy = sessionUtility.GetLoginSession().customerId, BookedRemarks = "Automatic Booked" }; string errorMessage = string.Empty; var response = new CallHelpDeskService().PostResponse <string>("putDetailstickets", req, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { return(Json("Ticket Booked. Ticket ID: " + response)); } } catch (Exception) { } return(Json(null)); }
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 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 sessionUtility = new SessionUtility(); var req = new { customerId = sessionUtility.GetLoginSession().customerId, rechageNumber = Convert.ToString(fc["MobileNumber"]), txnAmount = Convert.ToDecimal(fc["Amount"]), serviceProviderId = Convert.ToInt32(fc["OperatorId"]), serviceCircleId = 1, serviceChannelId = 2, remarks = "Recharge", tPin = new PasswordHash().HashShA1(tpin) }; string errorMessage = string.Empty; var response = new CallService().PostTransaction <TransactionResult>("doRecharge", req, ref errorMessage); if (response != null) { if (response.response != null) { response.response.OperatorNm = Convert.ToString(fc["OperatorNm"]).Trim(); } } return(PartialView("AckView", response)); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(PartialView("AckView")); }
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 RegisterAgent(IFormCollection fc) { try { var sessionUtility = new SessionUtility(); var req1 = new { customerId = sessionUtility.GetLoginSession().customerId, mobileNumber = Convert.ToString(sessionUtility.GetLoginSession().mobileNumber), aepsName = Convert.ToString(fc["agentname"]), shopName = Convert.ToString(fc["shopname"]), emailId = "*****@*****.**", pinCode = Convert.ToInt64(fc["pincode"]), address = Convert.ToString(fc["address"]), districtId = 1, panCard = Convert.ToString(fc["pannumber"]), panCardImagePath = "http://images.payinc.in/tpskyc/PAN/PAN_CARD_1442_6292.jpeg", aadharNumber = Convert.ToString(fc["aadharnumber"]), longitude = "78.09278884562441", latitude = "26.125321647834", agentStatus = 1, ipAddress = "176.9.24.146", boardedBy = sessionUtility.GetLoginSession().customerId, remark = "AEPS Registration" }; string errorMessage = string.Empty; var response = new CallService().PostResponse <string>("putDetailsIciciAepsAgents", req1, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { } } catch (Exception) { } return(View("Index")); }
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 AEPSAllServices() { GetBankList(); var sessionUtility = new SessionUtility(); var listParam = new List <KeyValuePair <string, string> >(); listParam.Add(new KeyValuePair <string, string>("mobileNumber", Convert.ToString(sessionUtility.GetLoginSession().mobileNumber))); string errorMessage = string.Empty; var response = new CallService().GetResponse <List <AEPSAgentRes> >("getDetailsAepsAgents", listParam, ref errorMessage); if (string.IsNullOrEmpty(errorMessage)) { sessionUtility.SetSession("AEPSAgentID", response[0].agentId); } return(View()); }
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 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")); }