Set up the payment hashes
(Mandatory Step)
​For details on static and dynamic hashes check here.

Passing static hashes

For passing static hashes during integration, use below code:
1
var payUPaymentParams = {
2
key: "Merchant key",
3
...
4
...
5
...
6
additionalParam: {
7
payment_related_details_for_mobile_sdk: "payment_related_details_for_mobile_sdk hash",
8
vas_for_mobile_sdk: "vas_for_mobile_sdk hash",
9
payment: "Payment Hash"
10
}
11
}
Copied!

Passing dynamic hashes

For passing dynamic hashes, merchant will receive a call on the method generateHash.
In the method parameter you will receive a dictionary or hashMap, extract the value of hashString from that. Pass that value to server, now server will append salt at the end and generate sha512 hash over it. Server will give that hash back to your app and app will give that hash to us via callback mechanism.
For passing dynamic hashes during integration, use below code:
1
generateHash = (e) => {
2
console.log(e.hashName);
3
console.log(e.hashString);
4
var hashStringWithoutSalt = e.hashString;
5
var hashName = e.hashName;
6
// Pass hashStringWithoutSalt to server
7
// Server will append salt at the end and generate sha512 hash over it
8
var hashValue = "<Set hash here which is fetched from server>";
9
var result = { [hashName]: hashValue };
10
PayUBizSdk.hashGenerated(result);
11
}
Copied!
Last modified 9mo ago