mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 19:16:27 +00:00
update
This commit is contained in:
@@ -86,16 +86,30 @@ const controller = async (req, res) => {
|
||||
respCode = generate.getResponseCode(respData);
|
||||
respData1 = generate.getResponseData(respData);
|
||||
|
||||
result = {
|
||||
code: "00",
|
||||
message: "Request Authenticate 1 Success",
|
||||
data: {
|
||||
trxID: generate.buf2hex(transactionId),
|
||||
responseCode: respCode,
|
||||
responseData: respData1,
|
||||
responseLength: respData1.length / 2,
|
||||
},
|
||||
};
|
||||
if (respData1) {
|
||||
result = {
|
||||
code: "00",
|
||||
message: "Request Authenticate 1 Success",
|
||||
data: {
|
||||
trxID: generate.buf2hex(transactionId),
|
||||
responseCode: respCode,
|
||||
responseData: respData1,
|
||||
responseLength: respData1.length / 2,
|
||||
},
|
||||
};
|
||||
} else{
|
||||
result = {
|
||||
code: "5004",
|
||||
message: "Empty Data from HSM",
|
||||
data: {
|
||||
trxID: generate.buf2hex(transactionId),
|
||||
responseCode: respCode,
|
||||
responseData: respData1,
|
||||
responseLength: respData1.length / 2,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// log debug
|
||||
winston.logger.debug(
|
||||
|
||||
Reference in New Issue
Block a user