How to create request Hash:

Request hash will be created with the below format. Use SHA256 algorithm to create the hash.

 

Format : trackId|terminalId|password|mechantkey|amount|currency

Sample : M11_Track|GamingT|password|54032953ebacdae8347672876436885b30dc20cdcb6a8ef001678e5d7ebed71a|100.00|BSD

 

 

String pipeSeperatedString  =

M11_Track+”|”+GamingT+”|”+password+”|”+54032953ebacdae8347672876436885b30dc20cdcb6a8ef001678e5d7ebed71a+”|”+1.00+”|”+BSD;

 

String requestHash= hash.sha256(pipeSeperatedString);

 

How to create response Hash:

Response hash will be created with the below format. Use SHA256 algorithm to create the hash.

 

Format : PaymentId|mechantkey|responseCode|amount

 

Sample: 1234567891234567891|54032953ebacdae8347672876436885b30dc20cdcb6a8ef001678e5d7ebed71a|000|100.00

 

 

String pipeSeperatedString  =request.getAttribute(“TranId”)+”|”+merchantKey+”|”+ request.getAttribute(“ResponseCode”)+”|”+tran.getTdDtranAmount().setScale(2, RoundingMode.CEILING).toString();

 

String responseHash = hash.sha256(pipeSeperatedString);

 

Test Credentials :

  • Purchase voucher Credit card number :

 

Card Holder Name : Test Test (should be same as first leg request )

Card Number : 4111111111111111

Card Expiry : 10/2021 (date should be greater than current date )

CVV : 123

 

  • Loan Money Debit card number :

 

Card Holder Name : Test Test (should be same as first leg request )

Card Number : 5179080000000006

Card Expiry : 10/2021 (date should be greater than current date )

CVV : 123