|
@ -1,5 +1,8 @@ |
|
|
using Common.Models.ExchangeRate; |
|
|
|
|
|
|
|
|
using Common.Models.Agent; |
|
|
|
|
|
using Common.Models.Bank; |
|
|
|
|
|
using Common.Models.ExchangeRate; |
|
|
using Common.Models.RequestResponse; |
|
|
using Common.Models.RequestResponse; |
|
|
|
|
|
using Common.Models.Status; |
|
|
using Common.Models.TxnModel; |
|
|
using Common.Models.TxnModel; |
|
|
using Common.TPService; |
|
|
using Common.TPService; |
|
|
using Common.Utility; |
|
|
using Common.Utility; |
|
@ -36,11 +39,11 @@ namespace TPService.GCC.Services |
|
|
case "paymentModeList": |
|
|
case "paymentModeList": |
|
|
return GetPaymentModeList(model as PaymentModeListRequest); |
|
|
return GetPaymentModeList(model as PaymentModeListRequest); |
|
|
|
|
|
|
|
|
case "cityList": |
|
|
|
|
|
return GetCityList(model as CityListRequest); |
|
|
|
|
|
|
|
|
case "agentList": |
|
|
|
|
|
return GetCityList(model as AgentRequest); |
|
|
|
|
|
|
|
|
case "branchList": |
|
|
|
|
|
return GetBranchList(model as BranchListRequest); |
|
|
|
|
|
|
|
|
case "bankList": |
|
|
|
|
|
return GetBranchList(model as BankRequest); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "exchangeRate": |
|
|
case "exchangeRate": |
|
@ -54,6 +57,8 @@ namespace TPService.GCC.Services |
|
|
|
|
|
|
|
|
case "release": |
|
|
case "release": |
|
|
return ApproveTransfer(model as TFReleaseTxnRequest); |
|
|
return ApproveTransfer(model as TFReleaseTxnRequest); |
|
|
|
|
|
case "status": |
|
|
|
|
|
return GetTransferStatus(model as GetStatus); |
|
|
case "cancelTransfer": |
|
|
case "cancelTransfer": |
|
|
return CancelTransfer(model as CancelTransferRequest); |
|
|
return CancelTransfer(model as CancelTransferRequest); |
|
|
case "refundTransfer": |
|
|
case "refundTransfer": |
|
@ -62,8 +67,7 @@ namespace TPService.GCC.Services |
|
|
return ModifyTransfer(model as ModifyTransferRequest); |
|
|
return ModifyTransfer(model as ModifyTransferRequest); |
|
|
case "modifyTransferStatus": |
|
|
case "modifyTransferStatus": |
|
|
return GetModifyTransferStatus(model as ModifyTransferStatusRequest); |
|
|
return GetModifyTransferStatus(model as ModifyTransferStatusRequest); |
|
|
case "transferStatus": |
|
|
|
|
|
return GetTransferStatus(model as TransferStatusRequest); |
|
|
|
|
|
|
|
|
|
|
|
case "transferFinancialsList": |
|
|
case "transferFinancialsList": |
|
|
return GetTransferFinancialsList(model as TransferFinancialsRequest); |
|
|
return GetTransferFinancialsList(model as TransferFinancialsRequest); |
|
|
case "exchangeRateList": |
|
|
case "exchangeRateList": |
|
@ -85,7 +89,77 @@ namespace TPService.GCC.Services |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private TPResponse GetCityList(AgentRequest getCity) |
|
|
|
|
|
{ |
|
|
|
|
|
TPResponse _response = new TPResponse(); |
|
|
|
|
|
CityListRequest req = new CityListRequest() |
|
|
|
|
|
{ |
|
|
|
|
|
UniqueID = PartnerId, |
|
|
|
|
|
Password = Password, |
|
|
|
|
|
SecurityKey = SecurityKey, |
|
|
|
|
|
CountryCode = getCity.PayoutCountry, |
|
|
|
|
|
CurrencyCode = getCity.ExternalBankId, |
|
|
|
|
|
PaymentModeCode = getCity.PaymentType, |
|
|
|
|
|
//PayoutBranchCode = exRate.PAgentId
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
_log.Info("GetExchangeRate | REQUEST :" + JsonConvert.SerializeObject(req)); |
|
|
|
|
|
CityListResponse res = _sendAPI.GetCityList(req); |
|
|
|
|
|
_log.Info("GetExchangeRate | RESPONSE :" + JsonConvert.SerializeObject(res)); |
|
|
|
|
|
_response.ResponseCode = res.ResponseCode; |
|
|
|
|
|
_response.Msg = res.ResponseMessage; |
|
|
|
|
|
//_response.Extra = res.g;
|
|
|
|
|
|
//_response.Extra2 = res.CostRate;
|
|
|
|
|
|
//_response.Id = res.CustomerRate;
|
|
|
|
|
|
_response.Data = res; |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
_response.ResponseCode = "1"; |
|
|
|
|
|
_response.Msg = "Unknown error!"; |
|
|
|
|
|
_log.ErrorFormat("ExchangeRateResponse | Exception occured On ExchangeRat Method At GCCREMITApi ! Details :" + ex.Message); |
|
|
|
|
|
} |
|
|
|
|
|
return _response; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private TPResponse GetBranchList(BankRequest getbranch) |
|
|
|
|
|
{ |
|
|
|
|
|
TPResponse _response = new TPResponse(); |
|
|
|
|
|
BranchListRequest req = new BranchListRequest() |
|
|
|
|
|
{ |
|
|
|
|
|
UniqueID = PartnerId, |
|
|
|
|
|
Password = Password, |
|
|
|
|
|
SecurityKey = SecurityKey, |
|
|
|
|
|
CountryCode = getbranch.CountryCode, |
|
|
|
|
|
CurrencyCode = getbranch.BankName, |
|
|
|
|
|
PaymentModeCode = getbranch.PaymentMethod, |
|
|
|
|
|
CityCode = getbranch.CityId.ToString(), |
|
|
|
|
|
Search = "", |
|
|
|
|
|
//PayoutBranchCode = exRate.PAgentId
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
_log.Info("GetExchangeRate | REQUEST :" + JsonConvert.SerializeObject(req)); |
|
|
|
|
|
BranchListResponse res = _sendAPI.GetBranchList(req); |
|
|
|
|
|
_log.Info("GetExchangeRate | RESPONSE :" + JsonConvert.SerializeObject(res)); |
|
|
|
|
|
_response.ResponseCode = res.ResponseCode; |
|
|
|
|
|
_response.Msg = res.ResponseMessage; |
|
|
|
|
|
//_response.Extra = res.g;
|
|
|
|
|
|
//_response.Extra2 = res.CostRate;
|
|
|
|
|
|
//_response.Id = res.CustomerRate;
|
|
|
|
|
|
_response.Data = res; |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
_response.ResponseCode = "1"; |
|
|
|
|
|
_response.Msg = "Unknown error!"; |
|
|
|
|
|
_log.ErrorFormat("ExchangeRateResponse | Exception occured On ExchangeRat Method At GCCREMITApi ! Details :" + ex.Message); |
|
|
|
|
|
} |
|
|
|
|
|
return _response; |
|
|
|
|
|
} |
|
|
private TPResponse GetExRate(ExchangeRate exRate) |
|
|
private TPResponse GetExRate(ExchangeRate exRate) |
|
|
{ |
|
|
{ |
|
|
TPResponse _response = new TPResponse(); |
|
|
TPResponse _response = new TPResponse(); |
|
@ -285,6 +359,47 @@ namespace TPService.GCC.Services |
|
|
return _response; |
|
|
return _response; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private TPResponse GetTransferStatus(GetStatus status) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
TPResponse _response = new TPResponse(); |
|
|
|
|
|
TransferStatusRequest req = new TransferStatusRequest() |
|
|
|
|
|
{ |
|
|
|
|
|
UniqueID = PartnerId, |
|
|
|
|
|
Password = Password, |
|
|
|
|
|
SecurityKey = SecurityKey, |
|
|
|
|
|
TransactionNo = status.PartnerPinNo, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
_log.Info("StatusTransferRequest | REQUEST :" + ObjectToXML(req)); |
|
|
|
|
|
|
|
|
|
|
|
var res = _sendAPI.GetTransferStatus(req); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_log.Info("StatusTransferResponse | RESPONSE :" + ObjectToXML(res)); |
|
|
|
|
|
_response.ResponseCode = res.ResponseCode == "001" ? "0" : "1"; |
|
|
|
|
|
|
|
|
|
|
|
_response.Msg = res.ResponseMessage; |
|
|
|
|
|
_response.Data = res; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
_response.ResponseCode = "1"; |
|
|
|
|
|
_response.Msg = "Unknown error!"; |
|
|
|
|
|
_log.ErrorFormat("StatusrResponse | Exception occured On ApproveTransfer Method At GCCREMITApi ! Details :" + ex.Message); |
|
|
|
|
|
} |
|
|
|
|
|
return _response; |
|
|
|
|
|
} |
|
|
//private ApproveTransferRequest ApproveTransferMap(TFReleaseTxnRequest ap)
|
|
|
//private ApproveTransferRequest ApproveTransferMap(TFReleaseTxnRequest ap)
|
|
|
//{
|
|
|
//{
|
|
|
// return new ApproveTransferRequest()
|
|
|
// return new ApproveTransferRequest()
|
|
@ -380,10 +495,10 @@ namespace TPService.GCC.Services |
|
|
throw new NotImplementedException(); |
|
|
throw new NotImplementedException(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private TPResponse GetTransferStatus(TransferStatusRequest transferStatusRequest) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//private TPResponse GetTransferStatus(TransferStatusRequest transferStatusRequest)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// throw new NotImplementedException();
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
private TPResponse GetTransferFinancialsList(TransferFinancialsRequest transferFinancialsRequest) |
|
|
private TPResponse GetTransferFinancialsList(TransferFinancialsRequest transferFinancialsRequest) |
|
|
{ |
|
|
{ |
|
|