@ -69,7 +69,7 @@ namespace GMENepal.GMENepalAPIService
_log . Info ( "ConfirmTransaction | REQUEST :" + JsonConvert . SerializeObject ( releaseRequest ) ) ;
_log . Info ( "ConfirmTransaction | REQUEST :" + JsonConvert . SerializeObject ( releaseRequest ) ) ;
var res = _fastMoneyWeb . ConfirmTransaction ( PartnerId , UserName , Password , releaseRequest . TfPin , releaseRequest . TxnId ) ;
var res = _fastMoneyWeb . ConfirmTransaction ( PartnerId , UserName , Password , releaseRequest . TfPin , releaseRequest . TxnId ) ;
_log . Info ( "ConfirmTransaction | RESPONSE :" + JsonConvert . SerializeObject ( res ) ) ;
_log . Info ( "ConfirmTransaction | RESPONSE :" + JsonConvert . SerializeObject ( res ) ) ;
_response . Data = response ;
_response . Data = response ;
@ -94,7 +94,7 @@ namespace GMENepal.GMENepalAPIService
if ( accValidate . BankCode . ToLower ( ) = = "imepay" | | accValidate . BankCode . ToLower ( ) = = "khalti" )
if ( accValidate . BankCode . ToLower ( ) = = "imepay" | | accValidate . BankCode . ToLower ( ) = = "khalti" )
{
{
WalletUserDetailResponse walletResponse = _fastMoneyWeb . GetWalletDetails ( PartnerId , UserName , Password , accValidate . BankCode . ToUpper ( )
WalletUserDetailResponse walletResponse = _fastMoneyWeb . GetWalletDetails ( PartnerId , UserName , Password , accValidate . BankCode . ToUpper ( )
, accValidate . AccountNumber , "" , GetAccValidateSignature ( accValidate ) ) ;
, accValidate . AccountNumber , "" , GetAccValidateSignature ( accValidate ) ) ;
response . ErrorCode = walletResponse . ResponseCode ;
response . ErrorCode = walletResponse . ResponseCode ;
response . Msg = walletResponse . ResponseMessage ;
response . Msg = walletResponse . ResponseMessage ;
response . Extra = walletResponse . FullName ;
response . Extra = walletResponse . FullName ;
@ -103,7 +103,7 @@ namespace GMENepal.GMENepalAPIService
else
else
{
{
response = _fastMoneyWeb . AccountValidation ( UserName , Password , accValidate . BankCode , accValidate . AccountNumber
response = _fastMoneyWeb . AccountValidation ( UserName , Password , accValidate . BankCode , accValidate . AccountNumber
, accValidate . ReceiverName , "" ) ;
, accValidate . ReceiverName , "" ) ;
}
}
_log . Info ( "AccountValidation | RESPONSE :" + JsonConvert . SerializeObject ( response ) . ToString ( ) ) ;
_log . Info ( "AccountValidation | RESPONSE :" + JsonConvert . SerializeObject ( response ) . ToString ( ) ) ;
@ -232,39 +232,39 @@ namespace GMENepal.GMENepalAPIService
if ( _response = = null )
if ( _response = = null )
{
{
_response = new TPResponse ( ) ;
_response = new TPResponse ( ) ;
var dt = gS . TransactionDate . Split ( '-' ) ;
var dt = gS . TransactionDate . Split ( '-' ) ;
string dateTxn = dt [ 1 ] + "-" + dt [ 2 ] + "-" + dt [ 0 ] ;
string dateTxn = dt [ 1 ] + "-" + dt [ 2 ] + "-" + dt [ 0 ] ;
_log . Info ( "SendTransaction | REQUEST :" + JsonConvert . SerializeObject ( gS ) . ToString ( ) ) ;
_log . Info ( "SendTransaction | REQUEST :" + JsonConvert . SerializeObject ( gS ) . ToString ( ) ) ;
if ( gS . PaymentMethod . ToLower ( ) = = "cash payment " )
if ( gS . PaymentMethod . ToLower ( ) = = "c" )
{
{
_response = new TPResponse ( ) ;
_response = new TPResponse ( ) ;
var exRate = _fastMoneyWeb . GetCalculation (
var exRate = _fastMoneyWeb . GetCalculation (
gS . PartnerId , gS . UserName , gS . Password , gS . SessionId , "" ,
gS . PartnerId , gS . UserName , gS . Password , gS . SessionId , "" ,
gS . SendingAmount , gS . PaymentMethod , gS . BeneCountry , gS . CalculateBy
"1000" , "C" , gS . BeneCountry , "P"
) ;
) ;
_log . Info ( "GetExRate | RESPONSE :" + JsonConvert . SerializeObject ( model ) . ToString ( ) ) ;
_log . Info ( "GetExRate | RESPONSE :" + JsonConvert . SerializeObject ( model ) . ToString ( ) ) ;
var exConfirmId = exRate . ExConfirmId ;
var exConfirmId = exRate . ExConfirmId ;
sendMoneyRes = _fastMoneyWeb . SendMoney ( PartnerId , UserName , Password , gS . SessionId , exConfirmId , gS . MembershipId , gS . CustomerName , gS . CustomerAddress ,
sendMoneyRes = _fastMoneyWeb . SendMoney ( PartnerId , UserName , Password , gS . ControlNo , 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 . 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 . 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 ( ) ) ;
, gS . BankCode , gS . BankName , gS . BankBranchName , gS . BankAccountNumber , dateTxn , gS . CalculateBy , gS . FreeCharge ) ;
_log . Info ( "SendTransaction | RESPONSE :" + JsonConvert . SerializeObject ( sendMoneyRes ) . ToString ( ) ) ;
_response . ResponseCode = sendMoneyRes . ErrorCode ;
_response . ResponseCode = sendMoneyRes . ErrorCode ;
_response . Msg = sendMoneyRes . Message ;
_response . Msg = sendMoneyRes . Message ;
_response . Extra = sendMoneyRes . ExRate ;
_response . Extra2 = sendMoneyRes . SendingAmount ;
_response . Id = sendMoneyRes . ReceivingAmount ;
_response . Extra = exRate . UsdVsNpr ;
_response . Extra2 = sendMoneyRes . PinNo ;
_response . Id = sendMoneyRes . TranId ;
_response . Data = sendMoneyRes ;
_response . Data = sendMoneyRes ;
return _response ;
return _response ;
}
}
if ( gS . BankCode . ToLower ( ) = = "imepay" | | gS . BankCode . ToLower ( ) = = "khalti" )
else if ( gS . PaymentMethod . ToLower ( ) = = "w" & & ( gS . BankCode . ToLower ( ) = = "imepay" | | gS . BankCode . ToLower ( ) = = "khalti" ) )
{
{
model = _fastMoneyWeb . RealTimeWalletDeposit ( PartnerId , UserName , Password , gS . BankCode , gS . CustomerName , gS . CustomerAddress
model = _fastMoneyWeb . RealTimeWalletDeposit ( PartnerId , UserName , Password , gS . BankCode , gS . CustomerName , gS . CustomerAddress
, gS . CustomerContact , gS . CustomerCountry , gS . CustomerIdType , gS . CustomerIdNumber , gS . BeneName , gS . BeneAddress
, gS . CustomerContact , gS . CustomerCountry , gS . CustomerIdType , gS . CustomerIdNumber , gS . BeneName , gS . BeneAddress
@ -274,19 +274,23 @@ namespace GMENepal.GMENepalAPIService
}
}
else
else
{
{
model = _fastMoneyWeb . ProcessBankDeposit ( gS . PartnerId , gS . UserName , gS . Password , gS . ControlNo , gS . ExConfirmId
var exRateBank = _fastMoneyWeb . GetCalculation ( gS . PartnerId , gS . UserName , gS . Password , gS . SessionId , "" , "1000" , "B" , gS . BeneCountry , "P" ) ;
model = _fastMoneyWeb . ProcessBankDeposit ( gS . PartnerId , gS . UserName , gS . Password , gS . ControlNo , exRateBank . ExConfirmId
, gS . MembershipId , gS . CustomerName , gS . CustomerAddress , gS . CustomerContact , gS . CustomerCity , gS . CustomerCountry
, 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 . 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 . IncomeSource , gS . Relationship , gS . PurposeOfRemittance , gS . SendingAmount , gS . ReceivingAmount , gS . PaymentMethod , gS . BankCode
, gS . BankName , gS . BankAccountNumber , dateTxn , gS . CalculateBy , gS . FreeCharge , gS . ControlNo , gS . PayoutCurrency , gS . ReceiverCostRate
, gS . BankName , gS . BankAccountNumber , dateTxn , gS . CalculateBy , gS . FreeCharge , gS . ControlNo , gS . PayoutCurrency , gS . ReceiverCostRate
, gS . SenderCostRate , gS . Signature , "" ) ;
, gS . SenderCostRate , gS . Signature , "" ) ;
_response . Extra = exRateBank . ExRate ;
}
}
_log . Info ( "SendTransaction | RESPONSE :" + JsonConvert . SerializeObject ( model ) . ToString ( ) ) ;
_log . Info ( "SendTransaction | RESPONSE :" + JsonConvert . SerializeObject ( model ) . ToString ( ) ) ;
_response . ResponseCode = model . ErrorCode ;
_response . ResponseCode = model . ErrorCode ;
_response . Msg = model . Msg ;
_response . Msg = model . Msg ;
_response . Extra = model . Extra ;
_response . Extra2 = model . Extra2 ;
_response . Extra2 = model . Extra2 ;
_response . Id = model . Id ;
_response . Id = model . Id ;
_response . Data = model ;
_response . Data = model ;
@ -298,7 +302,7 @@ namespace GMENepal.GMENepalAPIService
}
}
return _response ;
return _response ;
}
}
private TPResponse GetTxnStatus ( GetStatus getStatus )
private TPResponse GetTxnStatus ( GetStatus getStatus )
{
{
@ -404,7 +408,7 @@ namespace GMENepal.GMENepalAPIService
}
}
return _response ;
return _response ;
}
}
#region dataMapping
#region dataMapping
@ -430,7 +434,7 @@ namespace GMENepal.GMENepalAPIService
return new GMEGetCalculationRequest ( )
return new GMEGetCalculationRequest ( )
{
{
CalculateBy = eR . CalcBy ,
CalculateBy = eR . CalcBy ,
PaymentMethod = eR . PaymentType = = "Wallet" ? "W" : eR . PaymentType ,
PaymentMethod = eR . PaymentType = = "Wallet" ? "W" : eR . PaymentType ,
ReceivingAgentId = eR . PAgentName ,
ReceivingAgentId = eR . PAgentName ,
ReceivingCountry = eR . PCountryName ,
ReceivingCountry = eR . PCountryName ,
RemitAmount = eR . CalcBy = = "C" ? eR . CAmount . ToString ( ) : eR . PAmount . ToString ( )
RemitAmount = eR . CalcBy = = "C" ? eR . CAmount . ToString ( ) : eR . PAmount . ToString ( )
@ -485,7 +489,7 @@ namespace GMENepal.GMENepalAPIService
{
{
string sign = "" ;
string sign = "" ;
if ( sT . Agent . PBankId . ToLower ( ) = = "imepay" | | sT . Agent . PBankId . ToLower ( ) = = "khalti" )
if ( sT . Agent . PBankId . ToLower ( ) = = "imepay" | | sT . Agent . PBankId . ToLower ( ) = = "khalti" )
sign = GMEKey + PartnerId + UserName + Password + sT . Receiver . RAccountNo + sT . Transaction . PAmt ;
sign = GMEKey + PartnerId + UserName + Password + sT . Receiver . RAccountNo + sT . Transaction . PAmt ;
else
else
sign = GMEKey + UserName + Password + sT . Transaction . JMEControlNo + sT . Transaction . PAmt + sT . Receiver . RAccountNo + sT . Agent . PBankId ;
sign = GMEKey + UserName + Password + sT . Transaction . JMEControlNo + sT . Transaction . PAmt + sT . Receiver . RAccountNo + sT . Agent . PBankId ;