This commit is contained in:
parent
64d8ae1f49
commit
424dcb954c
|
@ -69,7 +69,7 @@ module.exports = Self => {
|
||||||
const cipher = crypto.createCipheriv('des-ede3-cbc', secretKey, iv);
|
const cipher = crypto.createCipheriv('des-ede3-cbc', secretKey, iv);
|
||||||
cipher.setAutoPadding(false);
|
cipher.setAutoPadding(false);
|
||||||
const orderKey = cipher.update(zeroPad(orderId, 8), 'utf8', 'base64')
|
const orderKey = cipher.update(zeroPad(orderId, 8), 'utf8', 'base64')
|
||||||
+ cipher.final('base64');
|
+ cipher.final();
|
||||||
|
|
||||||
const res = crypto.createHmac('sha256', Buffer.from(orderKey, 'base64'))
|
const res = crypto.createHmac('sha256', Buffer.from(orderKey, 'base64'))
|
||||||
.update(merchantParameters)
|
.update(merchantParameters)
|
||||||
|
|
Loading…
Reference in New Issue