mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
update bugs load balance
This commit is contained in:
@@ -206,18 +206,33 @@ const controller = async (req, res) => {
|
||||
);
|
||||
|
||||
// update data load balance
|
||||
await loadBalance.loadingBalanceUpdate(data);
|
||||
|
||||
result = {
|
||||
code: '5002',
|
||||
message: 'failed from HSM',
|
||||
data: {
|
||||
trxID: generate.buf2hex(transactionId),
|
||||
responseCode: respData1.slice(6, 10),
|
||||
transcode: null,
|
||||
load_balance_number: update.data.load_balance_number,
|
||||
},
|
||||
};
|
||||
let update = await loadBalance.loadingBalanceUpdate(data);
|
||||
if (update) {
|
||||
if (update.code == '00') {
|
||||
result = {
|
||||
code: '5002',
|
||||
message: 'failed from HSM',
|
||||
data: {
|
||||
trxID: generate.buf2hex(transactionId),
|
||||
responseCode: respData1.slice(6, 10),
|
||||
transcode: null,
|
||||
load_balance_number: update.data.load_balance_number,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
result = {
|
||||
code: update.code,
|
||||
message: update.message,
|
||||
data: {},
|
||||
};
|
||||
}
|
||||
} else {
|
||||
result = {
|
||||
code: '423',
|
||||
message: 'update/insert failed',
|
||||
data: {},
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// jika sudah mencapai maksimum counting flag, maka reset flag ke awal
|
||||
if (flag >= 255) {
|
||||
|
||||
Reference in New Issue
Block a user