You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting invalid Key Length error when trying to create checksum
Error: Invalid key length
at Cipheriv.createCipherBase (internal/crypto/cipher.js:103:19)
at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:121:20)
at new Cipheriv (internal/crypto/cipher.js:227:22)
at Object.createCipheriv (crypto.js:123:10)
at Function.encrypt (/Users/arjusmoon/NodeApps/playground/paytm/node_modules/paytmchecksum/PaytmChecksum.js:9:23)
at Function.calculateChecksum (/Users/arjusmoon/NodeApps/playground/paytm/node_modules/paytmchecksum/PaytmChecksum.js:94:24)
at Function.generateSignatureByString (/Users/arjusmoon/NodeApps/playground/paytm/node_modules/paytmchecksum/PaytmChecksum.js:56:24)
In your case, you most probably are using the Merchent_ID as a key. Use Merchent_KEY, It will work!
What you are currently using PaytmChecksum.generateSignature(paytmParams, Your_Merchent_ID); What you should be using PaytmChecksum.generateSignature(paytmParams, Your_Merchent_KEY);
@bvsk279 please tell me that , i am getting system error
response is ->> {head: {requestId: null, responseTimestamp: 1676197601140, version: v1}, body: {extraParamsMap: null, resultInfo: {resultStatus: F, resultCode: 501, resultMsg: System Error}}}
in test mode my code is working but in production it is not working
Getting invalid Key Length error when trying to create checksum
Error: Invalid key length
at Cipheriv.createCipherBase (internal/crypto/cipher.js:103:19)
at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:121:20)
at new Cipheriv (internal/crypto/cipher.js:227:22)
at Object.createCipheriv (crypto.js:123:10)
at Function.encrypt (/Users/arjusmoon/NodeApps/playground/paytm/node_modules/paytmchecksum/PaytmChecksum.js:9:23)
at Function.calculateChecksum (/Users/arjusmoon/NodeApps/playground/paytm/node_modules/paytmchecksum/PaytmChecksum.js:94:24)
at Function.generateSignatureByString (/Users/arjusmoon/NodeApps/playground/paytm/node_modules/paytmchecksum/PaytmChecksum.js:56:24)
var PaytmChecksum = require("paytmchecksum");
var paytmParams = {};
paytmParams["MID"] = "XXXXXXXXXX";
paytmParams["ORDERID"] = "232442453";
var paytmChecksum = PaytmChecksum.generateSignature(paytmParams, "XXXXXXXXXX");
paytmChecksum.then(function (checksum) {
console.log("generateSignature Returns: " + checksum);
}).catch(function (error) {
console.log(error);
});
The text was updated successfully, but these errors were encountered: