Callback Validation
Our system validates your request using the hash. In return, we send you a hash to validate.
Each callback delivery request includes a hash
parameter. This field contains a SHA1 of MD5 -encoded string.
Data used
fields |
---|
payment_id |
order.id |
order.id |
order.amount |
order.currency |
order.description |
password |
sha1(md5(strtoupper(payment_id,order.id,order.amount,order.currency,order.description,PASSWORD)))
Example
The example below uses CryptoJS
libraray.
const to_md5 =
payment_id +
order.id +
order.amount +
order.currency +
order.description +
merchant.pass;
const hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());
const result = CryptoJS.enc.Hex.stringify(hash);
Password
The password key will be used to verify the callback
, as the only one who has access to this password key is you.
Obtain the password key
You can find the password key in the Dashboard.
For more info check the authentication section.