internal Response <FundsLoadListModel> Reject(FundsLoadStatusType statusType, long fundsLoadId, bool v, long userId, string workstation) { FundsLoadListModel result = new FundsLoadListModel(); switch (statusType) { case FundsLoadStatusType.Created: if (_fundsOperations.ReviewReject(fundsLoadId, userId, workstation) == SystemResponseCode.SUCCESS) { return(new Response <FundsLoadListModel>(result, ResponseType.SUCCESSFUL, string.Empty, string.Empty)); } break; case FundsLoadStatusType.Reviewed: if (_fundsOperations.ApprovalReject(fundsLoadId, userId, workstation) == SystemResponseCode.SUCCESS) { return(new Response <FundsLoadListModel>(result, ResponseType.SUCCESSFUL, string.Empty, string.Empty)); } break; default: break; } return(new Response <FundsLoadListModel>(result, ResponseType.UNSUCCESSFUL, "Funds load reject action failed.", "Funds load reject action failed. Check account and connectivity.")); }
private bool ExecutePrepaidAccountCredit(FundsLoadListModel fundsLoad) { IntegrationController _integration = IntegrationController.Instance; Veneka.Indigo.Integration.Config.IConfig config; Veneka.Indigo.Integration.External.ExternalSystemFields externalFields; _integration.FundsLoadPrepaidSystem(fundsLoad.ProductId, out externalFields, out config); InterfaceInfo interfaceInfo = new InterfaceInfo { Config = config, InterfaceGuid = config.InterfaceGuid.ToString() }; log.Debug("calling CreditPrepaidAccount"); AuditInfo auditInfo = new AuditInfo(); var cbsResponse = _comsPrepaid.CreditPrepaidAccount(fundsLoad.Amount, fundsLoad.PrepaidAccountNo, externalFields, interfaceInfo, auditInfo); if (cbsResponse.ResponseCode == 0) { return(true); } return(false); }
private bool ExecuteBankAccountDebit(FundsLoadListModel fundsLoad, CustomerDetails customerDetails, long auditUserId, string auditWorkstation, int languageId) { try { log.Trace(t => t("ExecuteBankAccountDebit")); Veneka.Indigo.Integration.Config.IConfig config; Veneka.Indigo.Integration.External.ExternalSystemFields externalFields; IntegrationController _integration = IntegrationController.Instance; customerDetails.TotalCharged = customerDetails.FeeCharge.GetValueOrDefault(); customerDetails.AccountNumber = fundsLoad.BankAccountNo; _integration.FundsLoadCoreBankingSystem(customerDetails.ProductId, out externalFields, out config); InterfaceInfo interfaceInfo = new InterfaceInfo { Config = config, InterfaceGuid = config.InterfaceGuid.ToString() }; log.Trace(config.ToString()); AuditInfo auditInfo = new AuditInfo { AuditUserId = auditUserId, AuditWorkStation = auditWorkstation, LanguageId = languageId }; FeeChargeLogic feelogic = new FeeChargeLogic(_cardManService, _comsCore, _integration); BaseResponse feeresponse = feelogic.ChargeAmount(customerDetails, auditInfo, config, externalFields); log.Trace(t => t("ExecuteBankAccountDebit:After feelogic.FeeCharge")); if (feeresponse.ResponseType != ResponseType.SUCCESSFUL) { log.Trace($"ExecuteBankAccountDebit: feeresponse.ResponseType != ResponseType.SUCCESSFUL || {feeresponse.ResponseMessage}"); return(false); } else { log.Trace($"ExecuteBankAccountDebit: feeresponse.ResponseType == ResponseType.SUCCESSFUL"); return(true); } } catch (Exception exp) { log.Trace($"ExecuteBankAccountDebit: Exception Occurred := {exp.Message}"); throw; } }
internal Response <FundsLoadListModel> Approve(FundsLoadStatusType statusType, long fundsLoadId, bool v, long userId, string workstation, int languageId, int cardIssueReasonId) { FundsLoadListModel result = new FundsLoadListModel(); switch (statusType) { case FundsLoadStatusType.Created: if (_fundsOperations.ReviewAccept(fundsLoadId, userId, workstation) == SystemResponseCode.SUCCESS) { return(new Response <FundsLoadListModel>(result, ResponseType.SUCCESSFUL, string.Empty, string.Empty)); } break; case FundsLoadStatusType.Reviewed: if (_fundsOperations.ApprovalAccept(fundsLoadId, userId, workstation) == SystemResponseCode.SUCCESS) { return(new Response <FundsLoadListModel>(result, ResponseType.SUCCESSFUL, string.Empty, string.Empty)); } break; case FundsLoadStatusType.Approved: if (ExecuteFundsLoad(fundsLoadId, userId, workstation, languageId, cardIssueReasonId)) { _fundsOperations.Load(fundsLoadId, userId, workstation); return(new Response <FundsLoadListModel>(result, ResponseType.SUCCESSFUL, string.Empty, string.Empty)); } break; default: break; } return(new Response <FundsLoadListModel>(null, ResponseType.UNSUCCESSFUL, "Funds load action failed", "Funds load action failed, either insufficient funds or a technical issue.")); }