diff --git a/modules/client/back/methods/tpv-transaction/confirm.js b/modules/client/back/methods/tpv-transaction/confirm.js index 8c7d10558..8099475d7 100644 --- a/modules/client/back/methods/tpv-transaction/confirm.js +++ b/modules/client/back/methods/tpv-transaction/confirm.js @@ -68,7 +68,7 @@ module.exports = Self => { const cipher = crypto.createDecipheriv('des-ede3-cbc', secretKey, iv); cipher.setAutoPadding(false); - const orderKey = cipher.update(zeroPad(str, 8), 'utf8', 'base64') + const orderKey = cipher.update(zeroPad(orderId, 8), 'utf8', 'base64') + cipher.final('utf8'); const res = crypto.createHmac('sha256', Buffer.from(orderKey, 'base64')) @@ -102,8 +102,4 @@ module.exports = Self => { const pad = Buffer.alloc((blocksize - (buffer.length % blocksize)) % blocksize, 0); return Buffer.concat([buffer, pad]); } - - function base64UrlDecode() { - - } };