MAC VALIDATION FALED
The Error on the address bar when I hit cancel on the security message is as given below..
Good day sir,
This means your hash value is wrong and you need to review your hash computation procedure .
Steps to take :
- Ensure your parameter values are consistent and same value in form and hash concatenation .
- 1.a. Amount must always be in kobo and must be same value in form and hash concatenation
- 1.b. txn_ref must be unique for every transaction and must be same value in form and hash concatenation
- 1.c.Product_id, pay_item_id and mac key are correct as provided by interswitch and same value used in your form
- 1.d. Ensure there is no space or additional characters in your mac key when copied. You copy to notepad and then copy to your IDE to eliminate spaces
- Ensure you are performing SHA512 Hash of txn_ref,product_id,pay_item_id,amount,site_redirect_url and mac key.
- Ensure all mandatory fields are provided in your form with the correct parameters
P.S: Here is a sample working form:
You can use your current hash procedure to perform the SHA512 hash as described and compare values with the one in the form, you hash computation procedure is not correct till we can get same value using the same parameters as shown in the form above (strings given below as well).
String hashed = 50348662051011000000http://localhost/webpaytest/tpay.phpD3D1D05AFE42AD50818167EAC73C109168A0F108F32645C8B59E897FA930DA44F9230910DAC9E20641823799A107A02068F7BC0F4CC41D2952E249552255710F
Hash result (same as shown in the form above) =