From e81698329765bf70dffb2c8db9b2f15190e38920 Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <adhisimon@gmail.com> Date: Tue, 8 Feb 2022 13:04:47 +0700 Subject: [PATCH] Add pending on last digit of destination is 0 --- lib/partner.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/partner.js b/lib/partner.js index 2c1d0ad..4ec0c08 100644 --- a/lib/partner.js +++ b/lib/partner.js @@ -10,7 +10,16 @@ function buy(task, xid) { setTimeout( () => { - if (task.destination % 2) { + const destination = task.destination.toString(); + + if ((destination % 10) === 0) { + pull.report({ + trx_id: task.trx_id, + rc: '68', + message: `PENDING karena nomor tujuan ${task.destination} diakhiri 0`, + balance: config.supplier_ending_balance, + }); + } else if (destination % 2) { pull.report({ trx_id: task.trx_id, rc: '14', -- 1.9.0