From edc1f35e8b10229a02c8f3ea35a688b3710f481c Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Fri, 25 Aug 2023 10:54:11 +0700 Subject: [PATCH 1/2] update --- application/modules/hsm/authenticate2.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/modules/hsm/authenticate2.js b/application/modules/hsm/authenticate2.js index 5a4aaf2..5ea8681 100644 --- a/application/modules/hsm/authenticate2.js +++ b/application/modules/hsm/authenticate2.js @@ -86,6 +86,9 @@ const controller = async (req, res) => { useClient.sendData(reqData); + let respData = null; + let respData1 = null; + setInterval(function () { respData = Buffer.from([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]); _timeOut = true; From 2130890909fe5939e0288d6bcb48d14889378deb Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Fri, 25 Aug 2023 10:55:04 +0700 Subject: [PATCH 2/2] update --- application/modules/hsm/authenticate2.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/modules/hsm/authenticate2.js b/application/modules/hsm/authenticate2.js index 5ea8681..3f6b0dd 100644 --- a/application/modules/hsm/authenticate2.js +++ b/application/modules/hsm/authenticate2.js @@ -95,6 +95,12 @@ const controller = async (req, res) => { }, 10000); useClient.ws.on('message', (message) => { + winston.logger.debug( + `${uniqueCode} [ PROCESSING LOADING-BALANCE TOPUP-2 ]: message from HSM MESSAGE WOY... ${generate.buf2hex( + message + )}` + ); + while ( message[2] == 2 && message[0] == _validationTrxID[0] &&