Browse Source

#19286 push cash pickup to gme api

prod
Leeza Baidar 12 months ago
parent
commit
d1a57f21bb
  1. 28
      GMENepal/GMENepalAPIService/GMENepalAPI.cs
  2. 2
      GMENepal/Model/GMESendMoney.cs

28
GMENepal/GMENepalAPIService/GMENepalAPI.cs

@ -227,6 +227,7 @@ namespace GMENepal.GMENepalAPIService
{
GMESendMoney gS = SendModelMap(sendTransaction);
DbResult model = new DbResult();
SendMoneyResult sendMoneyRes = new SendMoneyResult();
TPResponse _response = new CustomModelValidaton().IsModelValid(gS);
if (_response == null)
{
@ -236,6 +237,33 @@ namespace GMENepal.GMENepalAPIService
string dateTxn = dt[1] + "-" + dt[2] + "-" + dt[0];
_log.Info("SendTransaction | REQUEST :" + JsonConvert.SerializeObject(gS).ToString());
if(gS.PaymentMethod.ToLower() == "cash payment")
{
_response = new TPResponse();
var exRate = _fastMoneyWeb.GetCalculation(
gS.PartnerId, gS.UserName, gS.Password, gS.SessionId, "",
gS.SendingAmount, gS.PaymentMethod, gS.BeneCountry, gS.CalculateBy
);
_log.Info("GetExRate | RESPONSE :" + JsonConvert.SerializeObject(model).ToString());
var exConfirmId = exRate.ExConfirmId;
sendMoneyRes = _fastMoneyWeb.SendMoney(PartnerId, UserName, Password, gS.SessionId, exConfirmId, gS.MembershipId, gS.CustomerName, gS.CustomerAddress,
gS.CustomerContact, gS.CustomerCity, gS.CustomerCountry, gS.CustomerIdType, gS.CustomerIdNumber, gS.BeneName, gS.BeneAddress, gS.BeneContact, gS.BeneCity
, gS.BeneCountry, gS.Profession, gS.IncomeSource, gS.Relationship, gS.PurposeOfRemittance, gS.SendingAmount, gS.ReceivingAmount, gS.PaymentMethod
, gS.BankCode, gS.BankName, gS.BankBranchName, gS.BankAccountNumber, gS.TransactionDate, gS.CalculateBy, gS.FreeCharge);
_log.Info("SendTransaction | RESPONSE :" + JsonConvert.SerializeObject(model).ToString());
_response.ResponseCode = sendMoneyRes.ErrorCode;
_response.Msg = sendMoneyRes.Message;
_response.Extra = sendMoneyRes.ExRate;
_response.Extra2 = sendMoneyRes.SendingAmount;
_response.Id = sendMoneyRes.ReceivingAmount;
_response.Data = sendMoneyRes;
return _response;
}
if (gS.BankCode.ToLower() == "imepay" || gS.BankCode.ToLower() == "khalti")
{
model = _fastMoneyWeb.RealTimeWalletDeposit(PartnerId, UserName, Password, gS.BankCode, gS.CustomerName, gS.CustomerAddress

2
GMENepal/Model/GMESendMoney.cs

@ -63,7 +63,7 @@ namespace GMENepal.Model
public string Relationship { get; set; }
[MaxLength(50)]
[Required]
[Required]
public string PurposeOfRemittance { get; set; }
[MaxLength(50)]

Loading…
Cancel
Save