I'm doing a project with NodeJS, and I'm developing the payment gateway.
The problem is that when generating the signature, it gives error SIS0042 - > The signature sent is not correct.
The firm generated it in the following way:
var merchant = new Buffer(JSON.stringify(this.generateMerchantParams(payment))).toString('base64'); var secretKey = new Buffer(secret, 'base64'); var cipher = _crypto.TripleDES.encrypt(order_id, secret); var order_encoded = cipher.ciphertext.toString(_crypto.enc.Base64); var hexMac256 = _crypto.HmacSHA256(merchant, _crypto.enc.Base64.parse(order_encoded));
With the signature (Ds_Signature: hexMac256 ), Ds_MerchantParameters ( merchant ), and Ds_SignatureVersion ( HMAC_SHA256_V1 ), we generate the form that redirects to the bank screen.
Can someone help me with this problem? Any help will be appreciated.
Thank you very much in advance.