diff --git a/application/modules/hsm/topup.js b/application/modules/hsm/topup.js index 526f9ba..4466b56 100644 --- a/application/modules/hsm/topup.js +++ b/application/modules/hsm/topup.js @@ -123,12 +123,7 @@ const controller = async (req, res) => { let trxrequestData = Buffer.from(generate.hexToBytes(requestData)); let _stopMessage = 1; let execByte = Buffer.alloc(2); - trxrequestData.copy( - execByte, - 0, - trxrequestData.length - 2, - trxrequestData[trxrequestData.length - 1] - ); + trxrequestData.copy(execByte, 0, 24, 26); let execID = generate.buf2hex(execByte); let apiId = Buffer.from([0x04]);