Commit fd31573763330fd814d267d42d04264b7193ee18

Authored by Adhidarma Hadiwinoto
1 parent 525f0bf553
Exists in master

Perbaikan dumper dan base_bill_amount

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

lib/callback/dumper.js
... ... @@ -58,7 +58,7 @@ ${(req.body && typeof req.body === 'object' && JSON.stringify(req.body, null, 2)
58 58  
59 59 try {
60 60 await fsPromise.stat(dumpDir);
61   - } catch {
  61 + } catch (e) {
62 62 await fsPromise.mkdir(dumpDir, { recursive: true });
63 63 }
64 64  
lib/callback/handler-postpaid.js
... ... @@ -44,7 +44,7 @@ module.exports = (req, res) => {
44 44 amount_to_charge: (isInquiry && Number(getFromReq(req, 'amount_to_charge')))
45 45 || undefined,
46 46 bill_count: Number(getFromReq(req, 'bill_count')) || undefined,
47   - base_bill_amount: Number(getFromReq(req, 'base_bill_amount')) || undefined,
  47 + base_bill_amount: Number(getFromReq(req, 'bill_amount')) || Number(getFromReq(req, 'base_bill_amount')) || undefined,
48 48  
49 49 message: {
50 50 xid,