diff --git a/application/modules/auth/auth.controller.js b/application/modules/auth/auth.controller.js index 4a29298..d81d0ea 100644 --- a/application/modules/auth/auth.controller.js +++ b/application/modules/auth/auth.controller.js @@ -101,9 +101,9 @@ const loginPartnerUser = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: checking data login...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: checking data login...` + // ); // check status data partner user apakah masih aktif atau tidak let checkDataLoginPartnerUser = await model.checkDataLoginPartnerUser( @@ -129,9 +129,9 @@ const loginPartnerUser = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: checking password...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: checking password...` + // ); // check password let checkPassword = await bcrypt.compare( @@ -158,9 +158,9 @@ const loginPartnerUser = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: generating access token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: generating access token...` + // ); // generate access token, yaitu token transaksi yang digunakan untuk setiap request ke setiap end point api let accessToken = await jwt.generateAccessToken({ @@ -171,9 +171,9 @@ const loginPartnerUser = async (req, res, next) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: generating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: generating refresh token...` + // ); // generate refresh token, yaitu token yang digunakan untuk mendapatkan token transaksi baru jika token sebelumnya sudah expired let refreshToken = await jwt.generateRefreshToken({ @@ -184,9 +184,9 @@ const loginPartnerUser = async (req, res, next) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: inserting refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-PARTNER-USER ]: inserting refresh token...` + // ); // insert refresh token await model.insertRefreshTokenPartner(email, refreshToken); @@ -263,9 +263,9 @@ const loginTerminal = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: checking MID and TID...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: checking MID and TID...` + // ); // check mid dan tid, apakah mid dan tid yang di request terdaftar dan status nya aktif di sistem CMS let checkMidTid = await model.checkMidTid(mid, tid); @@ -285,9 +285,9 @@ const loginTerminal = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: checking data login...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: checking data login...` + // ); // check data mid dan tid yang di request sudah di daftarkan di terminal login dan statusnya aktif atau tidak let checkDataLogin = await model.checkDataLogin(mid, tid); @@ -309,9 +309,9 @@ const loginTerminal = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: checking password...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: checking password...` + // ); // check password let checkPassword = await bcrypt.compare( @@ -336,9 +336,9 @@ const loginTerminal = async (req, res, next) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: generating access token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: generating access token...` + // ); // generate access token, yaitu token transaksi yang digunakan untuk request ke setiap end point api let accessToken = await jwt.generateAccessToken({ @@ -347,9 +347,9 @@ const loginTerminal = async (req, res, next) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: generating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: generating refresh token...` + // ); // generate refresh token, yaitu token yang digunakan untuk mengenerate token transaksi baru jika token sebelumnya sudah expired let refreshToken = await jwt.generateRefreshToken({ @@ -358,9 +358,9 @@ const loginTerminal = async (req, res, next) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: inserting refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOGIN-TERMINAL ]: inserting refresh token...` + // ); // insert refresh token await model.insertRefreshToken(mid, tid, refreshToken); @@ -437,9 +437,9 @@ const register = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REGISTER ]: checking MID and TID...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REGISTER ]: checking MID and TID...` + // ); // check mid dan tid yang di request sudah terdaftar di master terminal sistem CMS atau belum dan status nya aktif let checkMidTid = await model.checkMidTid(mid, tid); @@ -459,9 +459,9 @@ const register = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REGISTER ]: checking data login...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REGISTER ]: checking data login...` + // ); // check data login, apaka mid dan tid yang di request sudah terdaftar di terminal login atau belum let checkDataLogin = await model.checkDataLogin(mid, tid); @@ -483,9 +483,9 @@ const register = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REGISTER ]: encrypting password...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REGISTER ]: encrypting password...` + // ); // encrypt password let saltRounds = 10; @@ -507,9 +507,9 @@ const register = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REGISTER ]: inserting data login...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REGISTER ]: inserting data login...` + // ); // insert data login result = await model.insertDataLogin(data); @@ -585,17 +585,17 @@ const refreshTokenTerminal = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: authenticating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: authenticating refresh token...` + // ); // verify, apaka refresh token yang di request valid atau tidak await jwt.authenticateRefreshToken; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: checking refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: checking refresh token...` + // ); // cek apakah refresh token yang di request terdaftar di sistem CMS let checkRefreshToken = await model.checkRefreshToken( @@ -623,9 +623,9 @@ const refreshTokenTerminal = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: generating access token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: generating access token...` + // ); let accessToken; let refreshToken; @@ -637,9 +637,9 @@ const refreshTokenTerminal = async (req, res) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: generating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: generating refresh token...` + // ); // generate new refresh token refreshToken = await jwt.generateRefreshToken({ @@ -648,9 +648,9 @@ const refreshTokenTerminal = async (req, res) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: updating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-TERMINAL ]: updating refresh token...` + // ); // update insert refresh token await model.updateRefreshToken(mid, tid, refresh_token, refreshToken); @@ -731,17 +731,17 @@ const refreshTokenPartnerUser = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: authenticating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: authenticating refresh token...` + // ); // verify apaka refresh token yang di request valid atau tidak await jwt.authenticateRefreshToken; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: checking refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: checking refresh token...` + // ); // cek apaka refresh token yang di request terdaftar di sistem CMS atau tidak let checkRefreshToken = await model.checkRefreshTokenPartner( @@ -768,9 +768,9 @@ const refreshTokenPartnerUser = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: generating access token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: generating access token...` + // ); let accessToken; let refreshToken; @@ -807,9 +807,9 @@ const refreshTokenPartnerUser = async (req, res) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: generating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: generating refresh token...` + // ); // generate new refresh token refreshToken = await jwt.generateRefreshToken({ @@ -820,9 +820,9 @@ const refreshTokenPartnerUser = async (req, res) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: updating refresh token...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING REFRESH-TOKEN-PARTNER-USER ]: updating refresh token...` + // ); // update insert refresh token await model.updateRefreshTokenPartner(email, refresh_token, refreshToken); diff --git a/application/modules/history/history.controller.js b/application/modules/history/history.controller.js index f3f00e4..1c39609 100644 --- a/application/modules/history/history.controller.js +++ b/application/modules/history/history.controller.js @@ -228,9 +228,9 @@ const history = async (req, res) => { let now = moment().format('YYYY-MM-DD HH:mm:ss'); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CARD-HISTORY-FROM-CMS ]: checking parameter start date and end date...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CARD-HISTORY-FROM-CMS ]: checking parameter start date and end date...` + // ); // validation inquiry date if ((!start_date && end_date) || (start_date && !end_date)) { @@ -251,9 +251,9 @@ const history = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CARD-HISTORY-FROM-CMS ]: checking mid and tid is valid or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CARD-HISTORY-FROM-CMS ]: checking mid and tid is valid or not...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -275,9 +275,9 @@ const history = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CARD-HISTORY-FROM-CMS ]: getting history card from log CMS...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CARD-HISTORY-FROM-CMS ]: getting history card from log CMS...` + // ); // get data history kartu di log sistem CMS let history = await model.historyByCardNumber( diff --git a/application/modules/loadbalance/loadbalance.controller.js b/application/modules/loadbalance/loadbalance.controller.js index d81d528..9aa7016 100644 --- a/application/modules/loadbalance/loadbalance.controller.js +++ b/application/modules/loadbalance/loadbalance.controller.js @@ -451,9 +451,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking production card number or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking production card number or not...` + // ); // jika settingan untuk server adalah production if (process.env.SERVER_FOR == 'production') { @@ -501,9 +501,9 @@ const loadingBalanceRequest = async (req, res) => { let month = moment().format('M'); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -551,9 +551,9 @@ const loadingBalanceRequest = async (req, res) => { // jika settingan pengecekkan nomor kartu dengan card product CMS aktif if (checkByCardProductStatusValue == 'A') { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking card number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking card number...` + // ); // check card number request dengan list card number yang terdaftar di CMS let checkCardNumber = await model.checkCardNumber(card_number); @@ -578,9 +578,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking flag on the card and the server...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking flag on the card and the server...` + // ); // check last flag untuk nomor kartu dan uid yang di request di sistem CMS let checkFlag = await model.checkFlag(card_number, uid.toUpperCase()); @@ -592,9 +592,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking reservation pending...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking reservation pending...` + // ); // get total reservation pending let getReservationPending = await model.getReservationPendingV2( @@ -604,9 +604,9 @@ const loadingBalanceRequest = async (req, res) => { ); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking fraud transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking fraud transaction...` + // ); // cek disini apakah sebelumnya topup let cardHistory = await model.checkCardHistory(card_number); @@ -669,9 +669,9 @@ const loadingBalanceRequest = async (req, res) => { await model.getReservationPendingWithFlagCounter(card_number, now, flag); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking reservation pending with flag...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking reservation pending with flag...` + // ); // get total reservation pending // let getReservationPendingWithFlag = // await model.getReservationPendingWithFlag(card_number, now); @@ -696,9 +696,9 @@ const loadingBalanceRequest = async (req, res) => { }); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: updating reservation and load balance transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: updating reservation and load balance transaction...` + // ); // update let insertUpdate = await updateAllTransaction( @@ -716,9 +716,9 @@ const loadingBalanceRequest = async (req, res) => { if (insertUpdate) { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSINGE LOADING-BALANCE-REQUEST ]: updating flag to server...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSINGE LOADING-BALANCE-REQUEST ]: updating flag to server...` + // ); // update flag from Server await model.updateFlag( @@ -769,9 +769,9 @@ const loadingBalanceRequest = async (req, res) => { // await model.updateFlag(now, card_number, uid.toUpperCase(), balance, flag); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking reservation pending...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking reservation pending...` + // ); // reget total reservation pending getReservationPending = await model.getReservationPendingV2( @@ -829,14 +829,14 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking the card number in list fraud transaction or not...XXXXXXXXXXXXXXXXXXXX` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking the card number in list fraud transaction or not...XXXXXXXXXXXXXXXXXXXX` + // ); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking total topup amount...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking total topup amount...` + // ); // check total amount topup if (parseInt(amountTopup) <= 0) { @@ -857,9 +857,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking BI regulation status...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking BI regulation status...` + // ); // get BI regulation status let getBIRegulationStatus = await model.getBIRegulationStatus(); @@ -906,9 +906,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking max balance on the card...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking max balance on the card...` + // ); // get max saldo on the card let getMaxAmountOnTheCard = await model.getMaxAmountOnTheCard(); @@ -1007,9 +1007,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking max topup per month...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: checking max topup per month...` + // ); // get accumulated balance in this month let accumulatedBalance = 0; @@ -1121,9 +1121,9 @@ const loadingBalanceRequest = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: updating status reservation to in progress...${reservationNumberTemp}, ${now}, ${flag}` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-REQUEST ]: updating status reservation to in progress...${reservationNumberTemp}, ${now}, ${flag}` + // ); // update status to in progress let updateStatusReservation = await model.updateStatusReservation( @@ -1246,9 +1246,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking reservation status...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking reservation status...` + // ); // check reservation status for (let index = 0; index < reservation_number.length; index++) { @@ -1307,9 +1307,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking last log history...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking last log history...` + // ); // get last history by card number let lastHistory = await model.getLastHistory(card_number); @@ -1318,17 +1318,17 @@ const loadingBalanceInsert = async (req, param) => { // if last history card is topup (21 = log name id for topup) if (lastHistory.i_log_name == 21 && lastHistory.c_source == 'CMS') { // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: inserting fraud transaction...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: inserting fraud transaction...` + // ); // insert reservation transaction to fraud table await model.insertFraudTransaction(reservation_number); // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: suspending reservation...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: suspending reservation...` + // ); // update reservation with suspend status await model.suspendReservation(reservation_number, now); @@ -1351,9 +1351,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking fraud transaction...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking fraud transaction...` + // ); // get data fraud by card number and status fraud is not closed let fraudTransaction = await model.getFraudTransaction(card_number); @@ -1366,9 +1366,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking reservation pending...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking reservation pending...` + // ); // get total reservation pending without fraud let getReservationPending = await model.getReservationPendingWithoutFraud( @@ -1395,9 +1395,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking total topup amount...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking total topup amount...` + // ); // check total topup and request topup let amountTopup = 0; @@ -1428,9 +1428,9 @@ const loadingBalanceInsert = async (req, param) => { let loadBalanceNoSequence = req.load_balance_number_sequence; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: getting loading balance sequence...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: getting loading balance sequence...` + // ); if (!loadBalanceNoSequence) { // get loading balance @@ -1452,9 +1452,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: generating load balance number...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: generating load balance number...` + // ); loadBalanceNumber = await generateLoadBalanceNumber( getPartner, @@ -1471,9 +1471,9 @@ const loadingBalanceInsert = async (req, param) => { } // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: load balance number is ${loadBalanceNumber}.` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: load balance number is ${loadBalanceNumber}.` + // ); if (maxLoop > maxLoopParameter) { // create log @@ -1533,9 +1533,9 @@ const loadingBalanceInsert = async (req, param) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: getting reservation detail...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: getting reservation detail...` + // ); let detail = []; reservation_number = []; @@ -1601,14 +1601,14 @@ const loadingBalanceInsert = async (req, param) => { // check data load balance by reservation_number exist or not // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking load balance transaction has been exists or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: checking load balance transaction has been exists or not...` + // ); // log warn - winston.logger.warn( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: inserting load balance transaction...` - ); + // winston.logger.warn( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-INSERT ]: inserting load balance transaction...` + // ); // insert transaction let insertLoadingBalance = await model.insertLoadingBalance( @@ -1726,9 +1726,9 @@ const loadingBalanceUpdate = async (param) => { let today = moment().format('YYYY-MM-DD'); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -1763,9 +1763,9 @@ const loadingBalanceUpdate = async (param) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: updating load balance transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: updating load balance transaction...` + // ); // update transaction await model.updateLoadingBalance( @@ -1780,9 +1780,9 @@ const loadingBalanceUpdate = async (param) => { ); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: inserting load balance transaction history ${loadBalanceNumber}...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: inserting load balance transaction history ${loadBalanceNumber}...` + // ); let findDataLoadBalance = await model.findLoadBalance(loadBalanceNumber); let dataLoadBalance = {}; @@ -1866,9 +1866,9 @@ const loadingBalanceUpdate = async (param) => { if (!write_status) { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: inserting log for card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING LOADING-BALANCE-UPDATE ]: inserting log for card history...` + // ); // log card history await model.createLoadBalanceLog({ diff --git a/application/modules/paymentrecon/paymentrecon.controller.js b/application/modules/paymentrecon/paymentrecon.controller.js index aa69a22..9caa4f4 100644 --- a/application/modules/paymentrecon/paymentrecon.controller.js +++ b/application/modules/paymentrecon/paymentrecon.controller.js @@ -115,9 +115,9 @@ const paymentRecon = async (req, res) => { let now = moment().format('YYYY-MM-DD HH:mm:ss'); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartnerByID(partner_id); @@ -167,9 +167,9 @@ const paymentRecon = async (req, res) => { let PaymentReconNumber; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: generating payment recon number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: generating payment recon number...` + // ); // loop 1 await _sleep(helper.randomNumberInt()); @@ -221,9 +221,9 @@ const paymentRecon = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: checking reservation status has been cancelled or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: checking reservation status has been cancelled or not...` + // ); // check reservation number yang di request apakah masih aktif atau sudah di cancel let checkReservationCanceledStatus = @@ -241,9 +241,9 @@ const paymentRecon = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` + // ); // insert payment recon transaction await model.insertPaymentReconTransaction( @@ -270,9 +270,9 @@ const paymentRecon = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: checking reservation number in CMS...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: checking reservation number in CMS...` + // ); // cek reservation number tercatat di sistem CMS atau tidak let check = await model.checkReservationNumberAndAmount(reservation_number); @@ -289,9 +289,9 @@ const paymentRecon = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` + // ); // insert payment recon transaction await model.insertPaymentReconTransaction( @@ -331,9 +331,9 @@ const paymentRecon = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` + // ); // insert payment recon transaction await model.insertPaymentReconTransaction( @@ -373,9 +373,9 @@ const paymentRecon = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` + // ); // insert payment recon transaction await model.insertPaymentReconTransaction( @@ -409,9 +409,9 @@ const paymentRecon = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: updating payment recon number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: updating payment recon number...` + // ); let update = await model.updatePaymentReconNo(data); if (!update) { @@ -434,9 +434,9 @@ const paymentRecon = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING PAYMENT-RECON ]: inserting payment recon transaction...` + // ); result = { code: '00', diff --git a/application/modules/reservebalance/reservebalance.controller.js b/application/modules/reservebalance/reservebalance.controller.js index 54a316f..742b31f 100644 --- a/application/modules/reservebalance/reservebalance.controller.js +++ b/application/modules/reservebalance/reservebalance.controller.js @@ -138,9 +138,9 @@ const checkReservation = async (req, res) => { // pengecekkan nomor kartu yang di request adalah kartu production atau bukan berdasarkan settingan di .ENV dengan constanta SERVER_FOR. // Jika settingan .ENV SERVER_FOR adalah production dan nomor kartu KMT yang di request adalah kartu development maka sistem online topup akan menolaknya. Begitupun sebaliknya // Begitupun sebaliknya, jika settingan .ENV SERVER_FOR adalah development dan nomor kartu KMT yang di request adalah kartu production maka sistem online topup akan menolaknya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-CHECK ] checking production card number or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-CHECK ] checking production card number or not...` + // ); // jika settingan diperuntukan untuk production if (process.env.SERVER_FOR == 'production') { @@ -182,9 +182,9 @@ const checkReservation = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-CHECK ] checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-CHECK ] checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -207,9 +207,9 @@ const checkReservation = async (req, res) => { // log debug // lakukan pencarian ke table reservasion, apakah nomor kartu yang di request masih mempunyai transaksi reservasi saldo yang status nya masih pending atau in progress - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-CHECK ] getting reservation with pending status and in progress status...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-CHECK ] getting reservation with pending status and in progress status...` + // ); // get reservation pending & in progress status let checkSecure = false; @@ -303,9 +303,9 @@ const reservationValidate = async (req, res) => { // pengecekkan nomor kartu yang di request adalah kartu production atau bukan berdasarkan settingan di .ENV dengan constanta SERVER_FOR. // Jika settingan .ENV SERVER_FOR adalah production dan nomor kartu KMT yang di request adalah kartu development maka sistem online topup akan menolaknya. Begitupun sebaliknya // Begitupun sebaliknya, jika settingan .ENV SERVER_FOR adalah development dan nomor kartu KMT yang di request adalah kartu production maka sistem online topup akan menolaknya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking production card number or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking production card number or not...` + // ); // jika settingan diperuntukan untuk production if (process.env.SERVER_FOR == 'production') { @@ -355,9 +355,9 @@ const reservationValidate = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -382,9 +382,9 @@ const reservationValidate = async (req, res) => { // log debug // get settingan dari parameter apakah nomor kartu yang di request harus di cek dengan data card product CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting checking card number by card product CMS status on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting checking card number by card product CMS status on parameter...` + // ); // get parameter to check with card product cms or not let getCheckByCardProductStatusValue = @@ -395,9 +395,9 @@ const reservationValidate = async (req, res) => { // jika settingan pengecekkan nomor kartu yang di request dengan data card product yang ada di sistem CMS aktif if (checkByCardProductStatusValue == 'A') { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking card number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking card number...` + // ); // check card number yang di request terdaftar di card product CMS atau tidak let checkCardNumber = await model.checkCardNumber(card_number); @@ -422,9 +422,9 @@ const reservationValidate = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking reservation amount...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking reservation amount...` + // ); // check reservation amount // amount reservasi harus lebih dari 0 @@ -447,9 +447,9 @@ const reservationValidate = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -460,9 +460,9 @@ const reservationValidate = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking BI regulation status...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking BI regulation status...` + // ); // get settingan terkait pengecekkan regulasi BI dari parameter, apakah diaktifkan atau tidak let getBIRegulationStatus = await model.getBIRegulationStatus(); @@ -471,9 +471,9 @@ const reservationValidate = async (req, res) => { if (getBIRegulationStatus.c_value == 'A') { // log debug // get maksimum saldo yang harus ada di dalam kartu berdasarkan settingan parameter di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking max balance on the card...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking max balance on the card...` + // ); // get max saldo on the card let getMaxAmountOnTheCard = await model.getMaxAmountOnTheCard(); @@ -504,9 +504,9 @@ const reservationValidate = async (req, res) => { // log debug // proses pengecekkan akumulasi maksimum topup di bulan berjalan berdasarkan parameter setting di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking max topup per month...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking max topup per month...` + // ); // get accumulated balance in this month dari nomor kartu yang di request let accumulatedBalance = 0; @@ -553,9 +553,9 @@ const reservationValidate = async (req, res) => { // log debug // proses pengecekkan maksimum reservasi dengna status pending di parameter setting sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking max reservation...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking max reservation...` + // ); // get maksimum reservation dengan status pending dari parameter setting let getMaxReservation = await model.getMaxReservation(); @@ -567,9 +567,9 @@ const reservationValidate = async (req, res) => { // log debug // proses pencarian transaki dari table reservasi balance berdasarkan nomor kartu yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking total reservation pending...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] checking total reservation pending...` + // ); // get total reservation pending bersarkan nomor kartu yang di request yaitu total transaksi yang status nya pending beserta jumlah amount nya let getReservationPending = await model.getReservationPending( @@ -605,9 +605,9 @@ const reservationValidate = async (req, res) => { // log debug // process mendapatkan persentase issuer fee dan channel free berdasarkan settingan dari sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting issuer fee and channel fee...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting issuer fee and channel fee...` + // ); // set default issuer fee let issuerFee = 0; @@ -717,9 +717,9 @@ const reservationValidateV2 = async (req, res) => { // pengecekkan nomor kartu yang di request adalah kartu production atau bukan berdasarkan settingan di .ENV dengan constanta SERVER_FOR. // Jika settingan .ENV SERVER_FOR adalah production dan nomor kartu KMT yang di request adalah kartu development maka sistem online topup akan menolaknya. Begitupun sebaliknya // Begitupun sebaliknya, jika settingan .ENV SERVER_FOR adalah development dan nomor kartu KMT yang di request adalah kartu production maka sistem online topup akan menolaknya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking production card number or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking production card number or not...` + // ); // jika settingan diperuntukan untuk production if (process.env.SERVER_FOR == 'production') { @@ -769,9 +769,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -796,9 +796,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // get settingan dari parameter apakah nomor kartu yang di request harus di cek dengan data card product CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] getting checking card number by card product CMS status on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] getting checking card number by card product CMS status on parameter...` + // ); // get parameter to check with card product cms or not let getCheckByCardProductStatusValue = @@ -809,9 +809,9 @@ const reservationValidateV2 = async (req, res) => { // jika settingan pengecekkan nomor kartu yang di request dengan data card product yang ada di sistem CMS aktif if (checkByCardProductStatusValue == 'A') { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking card number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking card number...` + // ); // check card number yang di request terdaftar di card product CMS atau tidak let checkCardNumber = await model.checkCardNumber(card_number); @@ -836,9 +836,9 @@ const reservationValidateV2 = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking reservation amount...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking reservation amount...` + // ); // check reservation amount // amount reservasi harus lebih dari 0 @@ -861,9 +861,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -874,9 +874,9 @@ const reservationValidateV2 = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking BI regulation status...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking BI regulation status...` + // ); // get settingan terkait pengecekkan regulasi BI dari parameter, apakah diaktifkan atau tidak let getBIRegulationStatus = await model.getBIRegulationStatus(); @@ -885,9 +885,9 @@ const reservationValidateV2 = async (req, res) => { if (getBIRegulationStatus.c_value == 'A') { // log debug // get maksimum saldo yang harus ada di dalam kartu berdasarkan settingan parameter di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking max balance on the card...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking max balance on the card...` + // ); // get max saldo on the card let getMaxAmountOnTheCard = await model.getMaxAmountOnTheCard(); @@ -918,9 +918,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // proses pengecekkan akumulasi maksimum topup di bulan berjalan berdasarkan parameter setting di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking max topup per month...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking max topup per month...` + // ); // get accumulated balance in this month dari nomor kartu yang di request let accumulatedBalance = 0; @@ -967,9 +967,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // proses pengecekkan maksimum reservasi dengna status pending di parameter setting sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking max reservation...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking max reservation...` + // ); // get maksimum reservation dengan status pending dari parameter setting let getMaxReservation = await model.getMaxReservation(); @@ -981,9 +981,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // proses pencarian transaki dari table reservasi balance berdasarkan nomor kartu yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking total reservation pending...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] checking total reservation pending...` + // ); // get total reservation pending bersarkan nomor kartu yang di request yaitu total transaksi yang status nya pending beserta jumlah amount nya let getReservationPending = await model.getReservationPendingV2( @@ -1034,9 +1034,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // process mendapatkan persentase issuer fee dan channel free berdasarkan settingan dari sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] getting issuer fee and channel fee...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] getting issuer fee and channel fee...` + // ); // set default issuer fee let issuerFee = 0; @@ -1069,9 +1069,9 @@ const reservationValidateV2 = async (req, res) => { // log debug // process enkripsi data reservasi dengan HMAC yang nanti nya akan di kirim ke end point reservation api sebagai pembanding bahwa data yang sudah di enkripsi tidak dimanipulasi - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] generating security code from data reservation` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] generating security code from data reservation` + // ); // create security code yang isinya data reservasi yang akan di compare nantinya saat melakukan insert reservation let securityCode = await helper.createHMAC( @@ -1089,11 +1089,11 @@ const reservationValidateV2 = async (req, res) => { // log debug // process enkripsi data reservasi dengan AES yang nanti nya akan di kirim ke end point reservation api untuk menyimpan data reservasi - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] encrypting data reservation: ${JSON.stringify( - reservationData - )}` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE-V2 ] encrypting data reservation: ${JSON.stringify( + // reservationData + // )}` + // ); // enkripsi data reservasi sebelum melakukan transaksi reservasi let hash = helper.encryptText(JSON.stringify(reservationData)); @@ -1180,9 +1180,9 @@ const reservation = async (req, res) => { // pengecekkan nomor kartu yang di request adalah kartu production atau bukan berdasarkan settingan di .ENV dengan constanta SERVER_FOR. // Jika settingan .ENV SERVER_FOR adalah production dan nomor kartu KMT yang di request adalah kartu development maka sistem online topup akan menolaknya. Begitupun sebaliknya // Begitupun sebaliknya, jika settingan .ENV SERVER_FOR adalah development dan nomor kartu KMT yang di request adalah kartu production maka sistem online topup akan menolaknya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking production card number or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking production card number or not...` + // ); // jika settingan diperuntukan untuk production if (process.env.SERVER_FOR == 'production') { @@ -1228,9 +1228,9 @@ const reservation = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -1251,9 +1251,9 @@ const reservation = async (req, res) => { // log debug // get settingan dari parameter apakah nomor kartu yang di request harus di cek dengan data card product CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting checking card number by card product CMS status on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting checking card number by card product CMS status on parameter...` + // ); // get parameter to check with card product cms or not let getCheckByCardProductStatusValue = @@ -1264,9 +1264,9 @@ const reservation = async (req, res) => { // jika settingan pengecekkan nomor kartu yang di request dengan data card product yang ada di sistem CMS aktif if (checkByCardProductStatusValue == 'A') { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking card number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking card number...` + // ); // check card number yang di request terdaftar di card product CMS atau tidak let checkCardNumber = await model.checkCardNumber(card_number); @@ -1287,9 +1287,9 @@ const reservation = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking reservation amount...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking reservation amount...` + // ); // check reservation amount // amount reservasi harus lebih dari 0 @@ -1310,9 +1310,9 @@ const reservation = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -1323,18 +1323,18 @@ const reservation = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking BI regulation status...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking BI regulation status...` + // ); // get settingan terkait pengecekkan regulasi BI dari parameter, apakah diaktifkan atau tidak let getBIRegulationStatus = await model.getBIRegulationStatus(); if (getBIRegulationStatus.c_value == 'A') { // log debug // get maksimum saldo yang harus ada di dalam kartu berdasarkan settingan parameter di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking max balance on the card...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking max balance on the card...` + // ); // get max saldo on the card let getMaxAmountOnTheCard = await model.getMaxAmountOnTheCard(); @@ -1362,9 +1362,9 @@ const reservation = async (req, res) => { // log debug // proses pengecekkan akumulasi maksimum topup di bulan berjalan berdasarkan parameter setting di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking max topup per month...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking max topup per month...` + // ); // get accumulated balance in this month dari nomor kartu yang di request let accumulatedBalance = 0; @@ -1409,9 +1409,9 @@ const reservation = async (req, res) => { // log debug // proses pengecekkan maksimum reservasi dengna status pending di parameter setting sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking max reservation...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking max reservation...` + // ); // get maksimum reservation dengan status pending dari parameter setting let getMaxReservation = await model.getMaxReservation(); @@ -1449,9 +1449,9 @@ const reservation = async (req, res) => { // log debug // proses pencarian transaki dari table reservasi balance berdasarkan nomor kartu yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking total reservation pending...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking total reservation pending...` + // ); // get total reservation pending bersarkan nomor kartu yang di request yaitu total transaksi yang status nya pending beserta jumlah amount nya let getReservationPending = await model.getReservationPending( @@ -1485,9 +1485,9 @@ const reservation = async (req, res) => { // log debug // process mendapatkan persentase issuer fee dan channel free berdasarkan settingan dari sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] getting issuer fee and channel fee...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] getting issuer fee and channel fee...` + // ); // set default issuer fee let issuerFee = 0; @@ -1534,9 +1534,9 @@ const reservation = async (req, res) => { // log debug // proses pencarian sequence terakhir dari transaksi reservasi saldo berdasarkan partner di hari ini - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] checking reservation sequence...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] checking reservation sequence...` + // ); if (!reservationNoSequence) { // get reservation @@ -1550,9 +1550,9 @@ const reservation = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] generating reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] generating reservation number...` + // ); // proses genereate reservasi number untuk transaksi reservasi saldo yang dilakukan reservationNumber = await generateReservationNumber( @@ -1586,9 +1586,9 @@ const reservation = async (req, res) => { // log debug // proses pengecekkan value dari setting parameter untuk data reservasi yang tidak di load/topup apakah statusnya diaktifkan atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] getting reservation expiration date on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] getting reservation expiration date on parameter...` + // ); // get reservation expiration date by parameter let getReservationExpirationDateValue = @@ -1599,9 +1599,9 @@ const reservation = async (req, res) => { // log debug // proses pengecekkan satuan setting parameter untuk data reservasi yang tidak di load/topup di set dalam satuan apa, bisa jam atau hari dan sebagainya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] getting reservation expiration date measure on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] getting reservation expiration date measure on parameter...` + // ); // get reservation expiration date measure by parameter let getReservationExpirationDateMeasure = @@ -1676,9 +1676,9 @@ const reservation = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] inserting reservation transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] inserting reservation transaction...` + // ); // insert transaction let insert = await model.insertReservation(data); @@ -1687,9 +1687,9 @@ const reservation = async (req, res) => { // kegagalan insert data transaksi bisa disebabkan karena data ref no yang di berikan client sudah digunakan if (insert.rowCount < 1) { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] deleting reservation number validate...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] deleting reservation number validate...` + // ); // delete data reservasi yang mengalami kegagalan insert data await model.deleteReservationNumberValidate(reservationNumber); @@ -1709,9 +1709,9 @@ const reservation = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION ] inserting log for card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION ] inserting log for card history...` + // ); // log card history await model.createReserveBalanceLog({ @@ -1822,9 +1822,9 @@ const reservationV2 = async (req, res) => { // log debug // pengecekkan reservation data yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking reservation data...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking reservation data...` + // ); let reservationData; @@ -1918,9 +1918,9 @@ const reservationV2 = async (req, res) => { if (securityCode) { // log debug // process enkripsi data reservasi dengan HMAC sebagai pembanding bahwa data yang di decrypt valid - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] comparing security code with decrypt data...}` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] comparing security code with decrypt data...}` + // ); // create security code yang isinya data reservasi yang akan di compare nantinya saat melakukan insert reservation let securityCodeCompare = await helper.createHMAC( @@ -1945,26 +1945,26 @@ const reservationV2 = async (req, res) => { // log debug // pengecekkan reservation data yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] extracting reservation data : ${JSON.stringify( - { - mid: mid, - tid: tid, - card_number: card_number, - amount: amount, - transaction_date: transactionDate, - security_code: securityCode, - } - )}` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] extracting reservation data : ${JSON.stringify( + // { + // mid: mid, + // tid: tid, + // card_number: card_number, + // amount: amount, + // transaction_date: transactionDate, + // security_code: securityCode, + // } + // )}` + // ); // log debug // pengecekkan nomor kartu yang di request adalah kartu production atau bukan berdasarkan settingan di .ENV dengan constanta SERVER_FOR. // Jika settingan .ENV SERVER_FOR adalah production dan nomor kartu KMT yang di request adalah kartu development maka sistem online topup akan menolaknya. Begitupun sebaliknya // Begitupun sebaliknya, jika settingan .ENV SERVER_FOR adalah development dan nomor kartu KMT yang di request adalah kartu production maka sistem online topup akan menolaknya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking production card number or not...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking production card number or not...` + // ); // jika settingan diperuntukan untuk production if (process.env.SERVER_FOR == 'production') { @@ -2010,9 +2010,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -2033,9 +2033,9 @@ const reservationV2 = async (req, res) => { // log debug // get settingan dari parameter apakah nomor kartu yang di request harus di cek dengan data card product CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting checking card number by card product CMS status on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-VALIDATE ] getting checking card number by card product CMS status on parameter...` + // ); // get parameter to check with card product cms or not let getCheckByCardProductStatusValue = @@ -2046,9 +2046,9 @@ const reservationV2 = async (req, res) => { // jika settingan pengecekkan nomor kartu yang di request dengan data card product yang ada di sistem CMS aktif if (checkByCardProductStatusValue == 'A') { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking card number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking card number...` + // ); // check card number yang di request terdaftar di card product CMS atau tidak let checkCardNumber = await model.checkCardNumber(card_number); @@ -2069,9 +2069,9 @@ const reservationV2 = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking reservation amount...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking reservation amount...` + // ); // check reservation amount // amount reservasi harus lebih dari 0 @@ -2092,9 +2092,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -2105,18 +2105,18 @@ const reservationV2 = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking BI regulation status...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking BI regulation status...` + // ); // get settingan terkait pengecekkan regulasi BI dari parameter, apakah diaktifkan atau tidak let getBIRegulationStatus = await model.getBIRegulationStatus(); if (getBIRegulationStatus.c_value == 'A') { // log debug // get maksimum saldo yang harus ada di dalam kartu berdasarkan settingan parameter di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking max balance on the card...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking max balance on the card...` + // ); // get max saldo on the card let getMaxAmountOnTheCard = await model.getMaxAmountOnTheCard(); @@ -2146,9 +2146,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pengecekkan akumulasi maksimum topup di bulan berjalan berdasarkan parameter setting di sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking max topup per month...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking max topup per month...` + // ); // get accumulated balance in this month dari nomor kartu yang di request let accumulatedBalance = 0; @@ -2195,9 +2195,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pengecekkan maksimum reservasi dengna status pending di parameter setting sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking max reservation...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking max reservation...` + // ); // get maksimum reservation dengan status pending dari parameter setting let getMaxReservation = await model.getMaxReservation(); @@ -2235,9 +2235,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pencarian transaki dari table reservasi balance berdasarkan nomor kartu yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking total reservation pending...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking total reservation pending...` + // ); // get total reservation pending bersarkan nomor kartu yang di request yaitu total transaksi yang status nya pending beserta jumlah amount nya let getReservationPending = await model.getReservationPendingV2( @@ -2286,9 +2286,9 @@ const reservationV2 = async (req, res) => { // log debug // process mendapatkan persentase issuer fee dan channel free berdasarkan settingan dari sistem CMS - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting issuer fee and channel fee...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting issuer fee and channel fee...` + // ); // set default issuer fee let issuerFee = 0; @@ -2336,9 +2336,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pencarian sequence terakhir dari transaksi reservasi saldo berdasarkan partner di hari ini - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking reservation sequence...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] checking reservation sequence...` + // ); if (!reservationNoSequence) { // get reservation @@ -2352,9 +2352,9 @@ const reservationV2 = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] generating reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] generating reservation number...` + // ); // proses genereate reservasi number untuk transaksi reservasi saldo yang dilakukan reservationNumber = await generateReservationNumber( @@ -2371,10 +2371,6 @@ const reservationV2 = async (req, res) => { ); } - console.log( - 'OKKKKKKKKKKKKKKKKKKKK INI RESERVER SEQ: ' + reservationNoSequence - ); - // kondisi jika reservasi number yang digenerate selalu mendapatkan kode yang sudha digunakan / tidak unique if (maxLoop > maxLoopParameter) { // create log @@ -2392,9 +2388,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pengecekkan value dari setting parameter untuk data reservasi yang tidak di load/topup apakah statusnya diaktifkan atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting reservation expiration date on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting reservation expiration date on parameter...` + // ); // get reservation expiration date by parameter let getReservationExpirationDateValue = @@ -2405,9 +2401,9 @@ const reservationV2 = async (req, res) => { // log debug // proses pengecekkan satuan setting parameter untuk data reservasi yang tidak di load/topup di set dalam satuan apa, bisa jam atau hari dan sebagainya - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting reservation expiration date measure on parameter...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] getting reservation expiration date measure on parameter...` + // ); // get reservation expiration date measure by parameter let getReservationExpirationDateMeasure = @@ -2482,9 +2478,9 @@ const reservationV2 = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] inserting reservation transaction...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] inserting reservation transaction...` + // ); // insert transaction let insert = await model.insertReservation(data); @@ -2493,9 +2489,9 @@ const reservationV2 = async (req, res) => { // kegagalan insert data transaksi bisa disebabkan karena data ref no yang di berikan client sudah digunakan if (insert.rowCount < 1) { // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] deleting reservation number validate...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] deleting reservation number validate...` + // ); // delete data reservasi yang mengalami kegagalan insert data await model.deleteReservationNumberValidate(reservationNumber); @@ -2515,9 +2511,9 @@ const reservationV2 = async (req, res) => { } // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING RESERVATION-V2 ] inserting log for card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING RESERVATION-V2 ] inserting log for card history...` + // ); // log card history await model.createReserveBalanceLog({ @@ -2646,9 +2642,9 @@ const cancelReservationValidate = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -2671,9 +2667,9 @@ const cancelReservationValidate = async (req, res) => { // log debug // proses pengecekkan status reservation number yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE ]: getting reservation by reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE ]: getting reservation by reservation number...` + // ); // get reservation berdasarkan reservation number yang di request let getReservationCanBeCanceled = await model.getReservationCanBeCanceled( @@ -2831,9 +2827,9 @@ const cancelReservation = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -2856,9 +2852,9 @@ const cancelReservation = async (req, res) => { // log debug // proses pengecekkan status reservation number yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting reservation by reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting reservation by reservation number...` + // ); // get reservation pending & in progress status let getReservationCanBeCanceled = await model.getReservationCanBeCanceled( @@ -2938,9 +2934,9 @@ const cancelReservation = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -2963,17 +2959,17 @@ const cancelReservation = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: updating reservation to status cancel...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: updating reservation to status cancel...` + // ); // cancel transaction await model.cancelReservation(data, reservation_number); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: inserting log for card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: inserting log for card history...` + // ); // log card history await model.createReserveBalanceLog({ @@ -3308,9 +3304,9 @@ const cancelReservationValidateV2 = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -3353,9 +3349,9 @@ const cancelReservationValidateV2 = async (req, res) => { // log debug // proses pengecekkan status reservation number yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ]: getting reservation by ref no...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ]: getting reservation by ref no...` + // ); // get reservation berdasarkan ref_no yang di request getReservationCanBeCanceled = @@ -3396,9 +3392,9 @@ const cancelReservationValidateV2 = async (req, res) => { // log debug // proses pengecekkan status reservation number yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ]: getting reservation by reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ]: getting reservation by reservation number...` + // ); // get reservation berdasarkan reservation number yang di request getReservationCanBeCanceled = await model.getReservationCanBeCanceled( @@ -3593,11 +3589,11 @@ const cancelReservationValidateV2 = async (req, res) => { // log debug // process enkripsi data reservasi dengan AES yang nanti nya akan di kirim ke end point reservation api untuk menyimpan data reservasi - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ] encrypting data reservation: ${JSON.stringify( - reservationData - )}` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-VALIDATE-V2 ] encrypting data reservation: ${JSON.stringify( + // reservationData + // )}` + // ); // enkripsi data reservasi sebelum melakukan transaksi reservasi let hash = helper.encryptText(JSON.stringify(reservationData)); @@ -3722,9 +3718,9 @@ const cancelReservationV2 = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner( @@ -3750,9 +3746,9 @@ const cancelReservationV2 = async (req, res) => { // log debug // proses pengecekkan status reservation number yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting reservation by reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting reservation by reservation number...` + // ); // get reservation pending & in progress status let getReservationCanBeCanceled = await model.getReservationCanBeCanceled( @@ -3832,9 +3828,9 @@ const cancelReservationV2 = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -3857,9 +3853,9 @@ const cancelReservationV2 = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: updating reservation to status cancel...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: updating reservation to status cancel...` + // ); // cancel transaction await model.cancelReservation( @@ -3868,9 +3864,9 @@ const cancelReservationV2 = async (req, res) => { ); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: inserting log for card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION ]: inserting log for card history...` + // ); // log card history await model.createReserveBalanceLog({ @@ -3971,9 +3967,9 @@ const cancelReservationV2_1 = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid); @@ -3996,9 +3992,9 @@ const cancelReservationV2_1 = async (req, res) => { // log debug // proses pengecekkan status reservation number yang di request - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: getting reservation by reservation number...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: getting reservation by reservation number...` + // ); // get reservation berdasarkan reservation number yang di request let getReservationCanBeCanceled = await model.getReservationCanBeCanceled( @@ -4084,9 +4080,9 @@ const cancelReservationV2_1 = async (req, res) => { // log debug // proses checking partner yang request cancel dengan data reservasi yang mau di cancel apakah dari partner yang sama - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: checking partner request with partner reservation...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: checking partner request with partner reservation...` + // ); if (getPartner.i_partner != getReservationCanBeCanceled.i_partner) { // partner yang request cancel tidak sama dengan partner dari data reservasi @@ -4108,9 +4104,9 @@ const cancelReservationV2_1 = async (req, res) => { // log debug // proses pencarian saldo terakhir dari nomor kartu yang di request berdasarkan data log hitory - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: getting last balance on the card by card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: getting last balance on the card by card history...` + // ); // get last balance on the card let balance = 0; @@ -4133,17 +4129,17 @@ const cancelReservationV2_1 = async (req, res) => { }; // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: updating reservation to status cancel...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: updating reservation to status cancel...` + // ); // cancel transaction await model.cancelReservation(data, reservation_number); // log debug - winston.logger.debug( - `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: inserting log for card history...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING CANCEL-RESERVATION-V2.1 ]: inserting log for card history...` + // ); // log card history await model.createReserveBalanceLog({ @@ -4226,9 +4222,9 @@ const getFeeSharing = async (req, res) => { // log debug // proses pengecekkan data partner berdasarkan mid dan tid yang di request, apakah terdaftar di sistem CMS atau tidak - winston.logger.debug( - `${uniqueCode} [ PROCESSING GET-FEE-SHARING ] checking partner...` - ); + // winston.logger.debug( + // `${uniqueCode} [ PROCESSING GET-FEE-SHARING ] checking partner...` + // ); // get partner, merchant, terminal from tid let getPartner = await model.getPartner(mid, tid);