Please take note that the return URL parameters only required if you are using a system that require a return parameters that is different compared to default parameters sent by senangPay. For the list of default parameters sent by senangPay please refer here. If your system is able to use the default parameters sent by senangPay then please leave the Return URL Parameters empty.
For users of senangPay WooCommerce and OpenCart plugin please leave the field empty.
Some system requires a fixed parameters sent to them in order to integrate. So in this case senangPay provide a way for merchant to specify the parameters that they would like to receive from senangPay. The return URL parameters are also applied to callback URL.
What parameters are available
Below are the list of parameters that senangPay supported
|[NAME]||This is the name of the payer as keyed in by the payer.|
|[EMAIL]||The email of the payer as keyed in by the payer.|
|[PHONE]||The phone number of the payer as keyed in by the payer.|
|[AMOUNT]||The paid amount.|
|[TXN_STATUS]||Transaction status, value 1 for successful and 0 for failed.|
|[ORDER_ID]||The order id as sent by third party system to identify the transaction.|
|[TXN_REF]||The transaction reference number as generated by senangPay to uniquely identify the transaction.|
|[MSG]||Message to describe the status of the transaction.|
|[HASH]||Hashed value of the parameters using MD5.|
|[TXN_TYPE]||The payment method either FPX or credit / debit card.|
How to check the hashed value sent by senangPay
The hashed value is based on the return URL parameters string (appended with merchant secret key) with the value except for the hash.
For example if your system require parameters name as below:
1. email, example value “firstname.lastname@example.org”
2. amount_paid, example value “10.50”
3. txn_status, example value “1”
4. txn_msg, example value “Payment was successful”
5. order_id, example value “A5463″
Your merchant secret key is 123-456.
So you can key in the string below in the return URL parameters field.
To calculate the hash to verify the data you will need to md5 the string as below
- md5(email@example.com&amount_paid=10.50&txn_status=1&txn_msg=Payment was successful&order_id=A5463&hashed_value=[HASH]);
which will generate the hashed value 8e4d29818759e4069a635affdfc2572b.
Related Content :