From 109ddaa6632b09641b8fc8a353d9289c1355b87a Mon Sep 17 00:00:00 2001 From: ZainalHIS Date: Fri, 8 Jul 2022 14:28:48 +0700 Subject: [PATCH] update Parsing History Card --- application/modules/history/history.controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/modules/history/history.controller.js b/application/modules/history/history.controller.js index b6c9a1f..3afccd3 100644 --- a/application/modules/history/history.controller.js +++ b/application/modules/history/history.controller.js @@ -61,6 +61,14 @@ const cardHistory = async (req, res) => { // parsing data from card // PARSING DISINI ZEN + let date = new Date((parseInt(data.slice(0,8),16) + 946684800) * 1000) + let nominal = parseInt(data.slice(8, 16), 16) + let mid = data.slice(16, 20) + let tid = data.slice(20,24) + let istopup = parseInt(data.slice(24, 26), 16) == 0 ? 'Topup' : 'Deduct' + + //Parsing ini di foreach sebanyak list Data req API + result = { code: "00",