From e84546ae76bc0d132c2a54bad8f1a54554a687f0 Mon Sep 17 00:00:00 2001 From: Nattapon W Date: Thu, 5 Aug 2021 17:40:35 +0700 Subject: [PATCH] update mockup --- app.js | 1 + intx.js | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 0 deletions(-) diff --git a/app.js b/app.js index a3e4284..58dd802 100644 --- a/app.js +++ b/app.js @@ -398,6 +398,7 @@ app.post('/MGOfferInfo/NativeOfferInfo/getCurrentSplitChargeInfo', require('./in app.post('/v1/get_BillImage/', require('./int').getBillImage); app.get('/MGCCBSInvoiceInfo/MGCCBSInvoiceInfo/getAllCCBSInvoiceList/:ban/:pageSize/:pageNo', require('./intx').getAllCCBSInvoiceList); +app.get('/FinancialTransaction/MGPaymentInfo/getPaymentList/:ban/:pageSize/:pageNo', require('./intx').getPaymentList); app.post('/SBMWSREALCCP3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREALCCP); app.post('/SBMWSREAL3G15/DoServiceFromXML', express.text({type:"*/*"}), require('./sbm').getCheckBalance_SBMWSREAL); diff --git a/intx.js b/intx.js index d3c5339..0460276 100644 --- a/intx.js +++ b/intx.js @@ -1733,4 +1733,112 @@ module.exports.getAllCCBSInvoiceList = async (req, res) => { } res.status(200).send(response) +} + +module.exports.getPaymentList = async (req, res) => { + console.log('===== GET getPaymentList =====') + console.log('url', req.originalUrl); + console.log('headers', req.headers); + console.log('query', req.query); + console.log('params', req.params); + console.log('body', req.body); + + let responseErr = { + "getPaymentListResponse": { + "return": { + "uuid": "ed41f948-565c-4900-a94d-ee63100e2fa4", + "errorCode": "OSBbllngA10001", + "message": "error." + } + } + } + + let response = { + "getPaymentListResponse": { + "return": { + "uuid": "d90dc28a-4117-492e-9424-e238c51bf0b2", + "errorCode": "OSBbllngA00001", + "message": "Success.", + "paymentList": { + "paymentInfoArray": [ + { + "accountTimestamp": "2021042911444017738", + "activityIndicator": "P", + "activityType": "", + "actualAmt": "908.79", + "authorizationId": "", + "bankAccountNumber": "", + "bankCode": "", + "be": "0", + "billSeqNo": "11361", + "checkNo": "", + "companyCode": "TI", + "convInvNumber": "", + "creditAllocationList": { + "creditAllocationInfoArray": [ + { + "invoiceId": "615220", + "invoiceNo": "070420191000263712" + } + ], + "size": "1" + }, + "creditCardExpDate": "", + "creditCardNumber": "", + "creditCardType": "", + "creditId": "304365", + "currency": "THB", + "defaultWhtAmount": "", + "defaultWhtRate": "", + "designation": { + "code": "", + "description": "" + }, + "directDebitVoucher": "", + "lastActStatusDate": "2021-04-29T00:00:00.000+07:00", + "memoText": "", + "ocWhtAmount": "", + "ocWhtRate": "", + "operatorId": "107", + "originalAccount": "200078606", + "originalAmount": "908.79", + "originalConvertedAmount": "908.79", + "partitionId": "6", + "paymentId": "183851", + "paymentMethod": "CA", + "paymentSourceDesc": "True Money - Post Office", + "paymentSourceId": "TPOSTOB", + "paymentSourceRTIndicator": "E", + "paymentSourceType": "P", + "paymentSubMethod": "CA", + "periodKey": "2", + "postingDate": "2019-10-04T00:00:00.000+07:00", + "printRtIndicator": "E", + "rcWhtAmount": "", + "rcWhtRate": "", + "rctExtractInd": "", + "reasonCode": "", + "receiptTaxId": "TITPOSTOB27092019000000001", + "reversalTransId": "", + "transactionId": "1504063", + "ucWhtAmount": "", + "ucWhtRate": "", + "userId": "190927307564", + "valueDate": "2019-09-27T00:00:00.000+07:00", + "vatAmount": "59.45", + "whtAmount": "0.00", + "whtRate": "0.00", + "noneVatReceiptTaxId": "", + "noneVatAmount": "0.00" + } + ], + "size": "1" + }, + "totalSize": "1", + "calculatedPageSize": "24" + } + } + } + + res.status(200).send(response) } \ No newline at end of file -- libgit2 0.21.2