module.exports.getAccountCustomerInfo = async (req, res) => { console.log('===== POST getAccountCustomerInfo =====') 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 response = { "getAccountCustomerInfoResponse": { "return": { "withholdingTaxRate": "3", "errorCode": "OSBbllngA00001", "type": "ax21:AccountCustomerInfoResponse", "message": "Success.", "uuid": "4b8541d3-e6b4-44c3-8291-8688e5dc72cc", "account": { "accountCollection": { "collectionIndicator": "", "suspensionReason": "", "fullSuspensionIndicator": "", "punishmentLevels": "", "startDate": { "nil": true }, "status": "NONE" }, "classify": "R", "accountSubType": { "code": "EVP", "description": "Enterprise VIP" }, "ben": { "consolidateIndicator": "N", "billLanguage": "TH", "ben": "10000787", "bcBanId": "1465", "billMedia": "P", "status": { "code": "O", "description": "Open" } }, "type": "ax24:AccountInfo", "legacyBan": "", "exernalId": "", "ouId": "1282", "delinquent": "", "contact": { "preferredContactNo": "*", "officePhone": "", "homePhone": "023345678", "language": "TH", "privatePhone": "", "fax": "", "email": "" }, "agreementId": "1820", "customerId": "2456", "creditLimit": { "creditClass": "BV", "creditLimitReasonCode": "CREQ", "personalCreditLimit": "1000.0", "creditLimitExpirationDate": { "nil": true }, "temporaryCreditLimit": "0.0", "obligationCalculationFormula": "Formula 2" }, "company": { "code": "RF", "description": "True Move H Universal Communication Co., Ltd" }, "arBalance": "853.86", "accountPriority": "", "address": { "country": "", "zipCode": "10540", "roomNo": "", "city": "สมุทรปราการ", "addressType": "B", "moo": "", "soi": "", "building": "", "street": "บางพลีน้อย", "district": "บางพลี", "addressLine1": "13 * *", "houseNo": "13", "addressLine2": "* * * * บางพลีน้อย", "addressLine3": "* บางปลา * บางพลี", "addressLine4": "สมุทรปราการ 10540", "floor": "", "subDistrict": "บางปลา" }, "parentBan": { "nil": true }, "initiationReason": { "nil": true }, "creditStatus": { "reasonDescription": "", "lastActivityDate": { "nil": true }, "reasonCode": "", "status": "NONE" }, "convergenceCode": "", "accountId": "10000787", "statusDescription": "Active", "collectionStatus": { "reasonDescription": "", "lastActivityDate": { "nil": true }, "reasonCode": "", "status": "NONE" }, "taxId": "", "withholdingTaxUpdateDate": { "nil": true }, "withholdingTaxIndicator": "N", "name": { "branchCode": "", "nameType": "B", "firstName": "", "lastName": "", "organizationName": "มหาวิทยาลัยหอการค้าไทย", "branchName": "", "middleName": "", "storeId": "", "tilte": "" }, "openDate": "2013-03-02T11:32:16.000+07:00", "branchNo": "" }, "customer": { "creditLimitIndicator": "N", "income": "", "timeInBusiness": "1311", "occupation": "", "type": "ax24:CustomerInfo", "customerType": { "code": "C", "description": "Corporate" }, "exernalId": "", "lastActivityCode": "NEW_ACCOUNT", "contactLanguage": "TH", "educationLevel": "", "contact": { "preferredContactNo": "", "officePhone": "", "homePhone": "023345678", "language": "TH", "privatePhone": "", "fax": "", "email": "" }, "customerId": "2456", "trueCardGrading": { "nil": true }, "certificateExpirationDate": "2014-12-31", "marketingChannel": "", "offerCurrency": "THB", "expirationDate": { "nil": true }, "registerDate": "2013-03-02T11:32:13.000+07:00", "creditClass": "BX", "address": { "country": "", "zipCode": "10540", "roomNo": "", "city": "สมุทรปราการ", "addressType": "B", "moo": "", "soi": "", "building": "", "sinceDate": "2013-03-02T11:32:13+07:00", "street": "บางพลีน้อย", "district": "บางพลี", "addressLine1": "13 * *", "houseNo": "13", "addressLine2": "* * * * บางพลีน้อย", "addressLine3": "* บางปลา * บางพลี", "addressLine4": "สมุทรปราการ 10540", "floor": "", "subDistrict": "บางปลา" }, "totalProduct": "1", "personal": { "gender": "", "accommodation": { "nil": true }, "maritalStatus": "" }, "birthDate": "1987-11-30", "lastActivityReasonCode": "CREQ", "nationality": "", "certificateNumber": "337/2515", "largeCustomerIndicator": "N", "periodOfWork": { "nil": true }, "billCycleInfo": { "changeCycleRequestStatus": "N", "newBillCycle": { "nil": true }, "changeCycleReqeustDate": { "nil": true }, "billCycle": { "code": "2", "description": "Monthly Cycle close on the 1" }, "changeCycleIndicator": "N" }, "dealer": { "code": "90225773", "description": "คุณจรรจิรา จรรยาลิขิต" }, "name": { "branchCode": "", "nameType": "B", "firstName": "", "lastName": "", "organizationName": "มหาวิทยาลัยหอการค้าไทย", "branchName": "", "middleName": "", "storeId": "", "tilte": "" }, "customerGrading": "TOP", "taxExemptionIndicator": "N", "job": "", "effectiveDate": "2013-03-02T11:32:16.000+07:00", "certificateType": "O" } } } } res.status(200).send(response) } module.exports.getLastInvoiceList = async (req, res) => { console.log('===== GET getLastInvoiceList =====') 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 response = { "getLastInvoiceListResponse": { "return": { "invoiceList": { "size": "4", "invoiceInfoArray": [ { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "699", "invoiceBcBanId": "813", "dueDate": "2013-06-26T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "2013-06-01T00:00:00.000+07:00", "discountAmount": "0", "invoiceTaxAmount": "48.93", "invoiceAmount": "699", "invoiceStatusChangeDate": "2013-06-12T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "293.58", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "4487.58", "invoiceType": "BILL", "converageStartDate": "2013-05-02T00:00:00.000+07:00", "currency": "THB", "billSequenceNo": "293", "invoiceNo": "140620130200002104", "originalBalanceAmount": "101.00", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-06-12T00:00:00.000+07:00", "unpaidNetAmount": "699", "availableAdjustmentAmount": "992.58", "discountNetAmount": "0", "billDate": "2013-06-03T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "100.00", "restrictionAmount": "0", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "6", "year": "2013" }, "convergenceInvoiceNo": "140620130200002104", "coveredAmount": "0", "invoiceId": "8627", "performanceIndStatus": "", "unpaidTaxAmount": "48.93", "invoiceStatus": "O", "adjustmentAmount": "0", "restrictionTaxAmount": "0" }, { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "699", "invoiceBcBanId": "813", "dueDate": "2013-06-05T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "2013-05-01T00:00:00.000+07:00", "discountAmount": "0", "invoiceTaxAmount": "48.93", "invoiceAmount": "699", "invoiceStatusChangeDate": "2013-05-12T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "293.58", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "4487.58", "invoiceType": "BILL", "converageStartDate": "2013-04-02T00:00:00.000+07:00", "currency": "THB", "billSequenceNo": "292", "invoiceNo": "140520130200001097", "originalBalanceAmount": "747.93", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-05-12T00:00:00.000+07:00", "unpaidNetAmount": "699", "availableAdjustmentAmount": "992.58", "discountNetAmount": "0", "billDate": "2013-05-13T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "101.00", "restrictionAmount": "0", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "5", "year": "2013" }, "convergenceInvoiceNo": "140520130200001097", "coveredAmount": "0", "invoiceId": "20448", "performanceIndStatus": "", "unpaidTaxAmount": "48.93", "invoiceStatus": "O", "adjustmentAmount": "0", "restrictionTaxAmount": "0" }, { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "0.00", "invoiceBcBanId": "813", "dueDate": "2013-04-26T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "", "discountAmount": "0", "invoiceTaxAmount": "0", "invoiceAmount": "0", "invoiceStatusChangeDate": "2013-04-02T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "0", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "0.00", "invoiceType": "CN", "converageStartDate": "", "currency": "THB", "billSequenceNo": "291", "invoiceNo": "140420130200000419", "originalBalanceAmount": "0", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-04-02T00:00:00.000+07:00", "unpaidNetAmount": "0", "availableAdjustmentAmount": "0.00", "discountNetAmount": "0", "billDate": "2013-04-03T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "0", "restrictionAmount": "0.00", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "4", "year": "2013" }, "convergenceInvoiceNo": "140420130200000419", "coveredAmount": "0", "invoiceId": "3145", "performanceIndStatus": "", "unpaidTaxAmount": "0", "invoiceStatus": "F", "adjustmentAmount": "0", "restrictionTaxAmount": "0.00" }, { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "0.00", "invoiceBcBanId": "813", "dueDate": "2022-03-26T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "", "discountAmount": "0", "invoiceTaxAmount": "0", "invoiceAmount": "0", "invoiceStatusChangeDate": "2013-03-02T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "0", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "0.00", "invoiceType": "CN", "converageStartDate": "", "currency": "THB", "billSequenceNo": "290", "invoiceNo": "140320130200000071", "originalBalanceAmount": "0", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-03-02T00:00:00.000+07:00", "unpaidNetAmount": "0", "availableAdjustmentAmount": "0.00", "discountNetAmount": "0", "billDate": "2013-03-03T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "102.00", "restrictionAmount": "0.00", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "3", "year": "2013" }, "convergenceInvoiceNo": "140320130200000071", "coveredAmount": "0", "invoiceId": "629", "performanceIndStatus": "", "unpaidTaxAmount": "0", "invoiceStatus": "F", "adjustmentAmount": "0", "restrictionTaxAmount": "0.00" }, { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "0.00", "invoiceBcBanId": "813", "dueDate": "2022-03-26T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "", "discountAmount": "0", "invoiceTaxAmount": "0", "invoiceAmount": "0", "invoiceStatusChangeDate": "2013-03-02T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "0", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "0.00", "invoiceType": "CN", "converageStartDate": "", "currency": "THB", "billSequenceNo": "290", "invoiceNo": "140320130200000071", "originalBalanceAmount": "0", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-03-02T00:00:00.000+07:00", "unpaidNetAmount": "0", "availableAdjustmentAmount": "0.00", "discountNetAmount": "0", "billDate": "2013-02-03T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "1", "restrictionAmount": "0.00", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "3", "year": "2013" }, "convergenceInvoiceNo": "140320130200000071", "coveredAmount": "0", "invoiceId": "629", "performanceIndStatus": "", "unpaidTaxAmount": "0", "invoiceStatus": "F", "adjustmentAmount": "0", "restrictionTaxAmount": "0.00" }, { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "0.00", "invoiceBcBanId": "813", "dueDate": "2022-03-26T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "", "discountAmount": "0", "invoiceTaxAmount": "0", "invoiceAmount": "0", "invoiceStatusChangeDate": "2013-03-02T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "0", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "0.00", "invoiceType": "CN", "converageStartDate": "", "currency": "THB", "billSequenceNo": "290", "invoiceNo": "140320130200000071", "originalBalanceAmount": "2", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-03-02T00:00:00.000+07:00", "unpaidNetAmount": "0", "availableAdjustmentAmount": "0.00", "discountNetAmount": "0", "billDate": "2013-01-03T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "1", "restrictionAmount": "0.00", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "3", "year": "2013" }, "convergenceInvoiceNo": "140320130200000071", "coveredAmount": "0", "invoiceId": "629", "performanceIndStatus": "", "unpaidTaxAmount": "0", "invoiceStatus": "F", "adjustmentAmount": "0", "restrictionTaxAmount": "0.00" }, { "discountTaxAmount": "0", "adjustmentNetAmount": "0", "availableAdjustmentNetAmount": "0.00", "invoiceBcBanId": "813", "dueDate": "2022-03-26T00:00:00.000+07:00", "vatRate": "0.00", "converageEndDate": "", "discountAmount": "0", "invoiceTaxAmount": "0", "invoiceAmount": "0", "invoiceStatusChangeDate": "2013-03-02T00:00:00.000+07:00", "paymentAmount": "0", "baNo": "10000449", "billTaxAmount": "0", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "0.00", "invoiceType": "CN", "converageStartDate": "", "currency": "THB", "billSequenceNo": "290", "invoiceNo": "140320130200000071", "originalBalanceAmount": "1", "customerManagerBaNo": "10000449", "invoiceCreationDate": "2013-03-02T00:00:00.000+07:00", "unpaidNetAmount": "0", "availableAdjustmentAmount": "0.00", "discountNetAmount": "0", "billDate": "2012-12-03T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0", "accountId": "10000449", "billProductType": "", "billingDocumentStatus": { "code": "N", "description": "Confirmed" }, "unpaidAmount": "1", "restrictionAmount": "0.00", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "2", "month": "3", "year": "2013" }, "convergenceInvoiceNo": "140320130200000071", "coveredAmount": "0", "invoiceId": "629", "performanceIndStatus": "", "unpaidTaxAmount": "0", "invoiceStatus": "F", "adjustmentAmount": "0", "restrictionTaxAmount": "0.00" } ] }, "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "530dbd96-bada-4fcd-85d0-a829ba1347d7" } } } res.status(200).send(response) } module.exports.getLastDocumentList = async (req, res) => { console.log('===== POST getLastDocumentList =====') 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 response = { "getLastDocumentListResponse": { "return": { "invoiceList": { "size": "1", "invoiceInfoArray": [ { "discountTaxAmount": "0.00", "adjustmentNetAmount": "0.00", "availableAdjustmentNetAmount": "0.00", "invoiceBcBanId": "", "dueDate": "", "vatRate": "0.00", "converageEndDate": "", "discountAmount": "0.00", "invoiceTaxAmount": "0.00", "invoiceAmount": "0.00", "invoiceStatusChangeDate": "", "paymentAmount": "0", "baNo": "", "billTaxAmount": "0.00", "billingDocumentType": { "code": "BL", "description": "Bill" }, "billAmount": "0.00", "invoiceType": "", "converageStartDate": "", "currency": "THB", "billSequenceNo": "", "invoiceNo": "", "originalBalanceAmount": "0.00", "customerManagerBaNo": "", "invoiceCreationDate": "", "unpaidNetAmount": "0.00", "availableAdjustmentAmount": "0.00", "discountNetAmount": "0.00", "billDate": "2021-07-30T00:00:00.000+07:00", "disputeNetAmount": "0.00", "creditTaxAmount": "0.00", "accountId": "200112081", "billProductType": "DR", "billingDocumentStatus": { "code": "C", "description": "Calculated" }, "unpaidAmount": "0.00", "restrictionAmount": "0.00", "disputeTaxAmount": "0.00", "invoiceCycle": { "code": "", "month": "", "year": "" }, "convergenceInvoiceNo": "010720212800390921", "coveredAmount": "0.00", "invoiceId": "", "performanceIndStatus": "CH", "unpaidTaxAmount": "0", "invoiceStatus": "", "adjustmentAmount": "0", "restrictionTaxAmount": "0.00" } ] }, "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "56281a17-157d-4a4a-994d-c5e814b860e4" } } } res.status(200).send(response) } module.exports.getCreditLimitInfo = async (req, res) => { console.log('===== POST getCreditLimitInfo =====') 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 response = { "getCreditLimitInfoResponse": { "return": { "currentSpendingLimitList": { "size": "0" }, "futureCreditLimitAtSubList": { "size": "0" }, "currentCreditLimitAtSubList": { "size": "0" }, "futureSpendingLimitList": { "size": "0" }, "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "da63fabc-cfe0-4233-a9fe-7dcf922ffb0f", "creditLimitInfo": { "accountId": "200112081", "creditClass": "F", "personalCreditLimit": "400", "customerId": "334580", "creditLimit": "400", "defaultCreditLimit": "1", "obligationFormula": "Formula 1", "temporaryCreditLimit": "0" } } } } res.status(200).send(response) } module.exports.getBillMediaInfo = async (req, res) => { console.log('===== GET getBillMediaInfo =====') 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 response = { "getBillMediaInfoResponse": { "return": { "billMediaInfo": { "billMediaCode": "S", "billMediaDescription": "SMS", "billMediaValue": "0911111111" }, "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "a06924ed-f8b1-4778-97aa-cf3a0d47b094" } } } res.status(200).send(response) } module.exports.getProductHistoryList = async (req, res) => { console.log('===== POST getProductHistoryList =====') 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 response = { "getProductHistoryListResponse": { "return": { "totalSize": "59", "productHistoryList": { "size": "2", "subscriberStatusHistoryInfoArray": [ { "barringByRequestActivityDate": "2016-09-01T17:25:03.000+07:00", "barringByRequestIndicator": "PSUS", "collectionStatus": { "reasonDescription": "Default Request for restore from suspension from Reg CL", "lastActivityDate": "2018-11-07T07:15:02.000+07:00", "reasonCode": "DEFRS", "status": "NONE" }, "linkPrevProductId": "", "barringByRequestReasonCode": "DDSC", "creditLimitAtSubStatus": { "reasonDescription": "", "lastActivityDate": "", "reasonCode": "", "status": "NONE" }, "subscriberId": "1111841", "barringByRequestReasonDescription": "Delete Additional OfferXX", "creditStatus": { "reasonDescription": "Restore from Suspension request from Credit Limit Collection", "lastActivityDate": "2017-07-30T12:23:44.000+07:00", "reasonCode": "MONRS", "status": "NONE" }, "linkNextProductId": "", "effectiveDate": "2018-11-07T07:15:02.000+07:00", "status": { "statusDate": "2016-09-01T17:32:41.000+07:00", "statusLastActivity": "16", "statusDescription": "Active", "statusReasonDescription": "Restore Subs - FoundA", "statusReasonCode": "RSP5", "lastActivityPathId": "78", "statusCode": "XX" } }, { "barringByRequestActivityDate": "2016-09-01T17:25:04.000+07:00", "barringByRequestIndicator": "PSUS", "collectionStatus": { "reasonDescription": "Default Request for restore from suspension from Reg CL", "lastActivityDate": "2018-08-14T19:29:43.000+07:00", "reasonCode": "DEFRS", "status": "NONE" }, "linkPrevProductId": "", "barringByRequestReasonCode": "DDSC", "creditLimitAtSubStatus": { "reasonDescription": "", "lastActivityDate": "", "reasonCode": "", "status": "NONE" }, "subscriberId": "1111841", "barringByRequestReasonDescription": "Delete Additional Offer", "creditStatus": { "reasonDescription": "Restore from Suspension request from Credit Limit Collection", "lastActivityDate": "2017-07-30T12:23:44.000+07:00", "reasonCode": "MONRS", "status": "NONE" }, "linkNextProductId": "", "effectiveDate": "2018-08-14T19:29:43.000+07:00", "status": { "statusDate": "2016-09-01T17:32:41.000+07:00", "statusLastActivity": "16", "statusDescription": "Active", "statusReasonDescription": "Restore Subs - FoundB", "statusReasonCode": "RSP5", "lastActivityPathId": "78", "statusCode": "ZZ" } } ] }, "calculatedPageSize": "2", "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "84943fc3-00c2-424b-a432-23860fcc7ad3" } } } 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 response = { "getPaymentListResponse": { "return": { "totalSize": "131", "calculatedPageSize": "1", "errorCode": "OSBbllngA00001", "type": "ax28:PaymentListResponse", "message": "Success.", "uuid": "1271b6ef-54e6-472c-867f-36dad1a97781", "paymentList": { "size": "1", "type": "ax211:PaymentList", "paymentInfoArray": [ { "billSeqNo": "7645", "activityIndicator": "P", "originalConvertedAmount": "1000", "authorizationId": "485021", "defaultWhtAmount": "0", "creditCardType": "", "postingDate": "2016-07-11T00:00:00.000+07:00", "paymentId": "163939558", "ucWhtAmount": "", "periodKey": "30", "operatorId": "100", "paymentSourceDesc": "True Money - Echannels", "paymentSourceRTIndicator": "N", "rcWhtRate": "", "companyCode": "TI", "rcWhtAmount": "", "reversalTransId": "", "rctExtractInd": "", "transactionId": "1523941276", "vatAmount": "65.42", "convInvNumber": "", "creditCardNumber": "", "defaultWhtRate": "0", "ocWhtAmount": "", "paymentMethod": "CA", "designation": { "code": "", "description": "" }, "paymentSubMethod": "CA", "whtAmount": "0", "accountTimestamp": "2017101207465982860", "be": "0", "whtRate": "0", "creditAllocationList": { "creditAllocationInfoArray": [ { "invoiceId": "359694883", "invoiceNo": "6060812200372" }, { "invoiceId": "359731321", "invoiceNo": "6070812400386" } ], "size": "2" }, "ocWhtRate": "", "ucWhtRate": "", "creditId": "175519470", "creditCardExpDate": "122100", "printRtIndicator": "Y", "lastActStatusDate": "2016-09-27T00:00:00.000+07:00", "checkNo": "", "bankAccountNumber": "", "currency": "THB", "reasonCode": "", "actualAmt": "1000", "receiptTaxId": "ACEWL7452502", "bankCode": "", "partitionId": "7", "paymentSourceId": "TMNO", "valueDate": "2016-07-11T00:00:00.000+07:00", "userId": "TM03", "originalAccount": "203479997", "paymentSourceType": "O", "originalAmount": "1000", "activityType": "", "memoText": "", "directDebitVoucher": "38193159" } ] } } } } res.status(200).send(response) } module.exports.sumCollectionAmount = async (req, res) => { console.log('===== POST sumCollectionAmount =====') 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 response = ` 0 Success ea1ca9a9-fee1-47ce-8e7d-f1b45ee1cade 0.0 0.0 ` res.status(200).send(response) } module.exports.getBillingAddress = async (req, res) => { console.log('===== GET getBillingAddress =====') 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 response = { "getBillingInfoResponse": { "return": { "errorCode": "OSBbllngA00001", "message": "Success.", "uuid": "61ba9f6c-0b3c-4861-a82a-d252f0b23e63", "billing": { "billingArrangementInfo": { "statusDate": "2019-03-27T00:00:00.000+07:00", "consolidateBillInd": "Y", "lastUpdateDate": "2019-03-27T10:15:45.000+07:00", "businessEntityId": "0", "externalId": "", "bcBanID": "700046423", "billingArrangementStatus": "O", "itemizedTaxIndicator": "Y", "billFormat": "S", "splitParam": "", "billProductionIndicator": "Y", "billLang": "TH", "bcEffectiveDate": "2019-03-27T10:15:43.000+07:00", "openDate": "2019-03-27T00:00:00.000+07:00", "billProductionFrequency": "1" }, "eTaxInfo": { "notificationList": "", "mobileNumberList": "", "emailList": "", "mediaValue": { "code": "O", "description": "Other" } }, "address": { "country": "", "zipCode": "50200", "roomNo": "-", "city": "เชียงใหม่", "addressType": "I", "moo": "1", "soi": "-", "building": "UNI LOFT CHAINGMAI D", "street": "-", "district": "เมืองเชียงใหม่", "addressLine1": "137 * 1 * - *", "houseNo": "137", "addressLine2": "* UNI LOFT CHAINGMAI D * - * - * -", "timeAtAddress": "0101", "addressLine3": "* สุเทพ * เมืองเชียงใหม่", "addressLine4": "เชียงใหม่ 50200", "floor": "-", "subDistrict": "สุเทพ" }, "contact": { "preferredContactNo": "", "officePhone": "", "homePhone": "0924971811", "language": "", "privatePhone": "", "fax": "", "email": "" }, "name": { "branchCode": "", "nameType": "I", "firstName": "สัปปะรด", "lastName": "ผลไม้", "organizationName": "", "branchName": "", "middleName": "", "storeId": "", "tilte": "คุณ" }, "personal": { "gender": "F", "accommodation": "", "maritalStatus": "" } } } } } res.status(200).send(response) } module.exports.getDCBStatus = async (req, res) => { console.log('===== POST getDCBStatus =====') 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 response = { "code": 200, "description": "Success", "request_transaction_id": "CCBS_ON0023222046_14355965", "mcs_transaction_id": "292a1e4176f440608c9cec23dfe01eb1", "result": { "subscriber_type": "POS", "register_datetime": "2020-11-11T23:47:12", "statuschange_datetime": "2020-11-11T23:47:12", "cancel_datetime": null, "msisdn": "66892143263", "service_no": "66892143263", "ref_type": "MSISDN", "subscriber_id": "7766714", "certificate_id": "3100201309134", "company": "RM", "status": "ACTIVE", "cancel_reason": "", "kyc": true, "merchants": null } } res.status(200).send(response) } module.exports.getBalanceList = async (req, res) => { console.log('===== POST getBalanceList =====') 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 response = { "getBalanceListResponse": { "return": { "totalSize": "1", "calculatedPageSize": "100", "errorCode": "OSBbllngA00001", "balanceList": { "size": "1", "balanceInfoArray": [ { "account": { "minDueDateIndicator": "N", "accountCollection": { "status": "NONE" }, "classify": "R", "maxDueDateIndicator": "N", "accountSubType": { "code": "RES", "description": "Individual - Residential" }, "ben": { "consolidateIndicator": "Y", "billLanguage": "TH", "ben": "200078606", "bcBanId": "700046423", "billMedia": "S", "status": { "code": "O", "description": "Open" } }, "comingDueDateIndicator": "N", "ouId": "115614", "delinquent": "", "contact": { "homePhone": "0924971811", "language": "TH", "preferredContactNo": "0909230076" }, "agreementId": "1344349", "customerId": "187374", "creditLimit": { "creditClass": "X", "creditLimitReasonCode": "CREQ", "personalCreditLimit": "0", "temporaryCreditLimit": "0", "obligationCalculationFormula": "Formula 3" }, "company": { "code": "TI", "description": "True Internet Corporation Company Limited" }, "arBalance": "0", "address": { "zipCode": "50200", "city": "เชียงใหม่", "addressType": "I", "district": "เมืองเชียงใหม่", "addressLine1": "137 * 1 * - *", "houseNo": "137", "addressLine2": "* UNI LOFT CHAINGMAI D * - * - * -", "addressLine3": "* สุเทพ * เมืองเชียงใหม่", "addressLine4": "เชียงใหม่ 50200", "subDistrict": "สุเทพ", "sinceDate": "2019-03-27T00:00:00.000+07:00", "building": "UNI LOFT CHAINGMAI D", "floor": "-", "moo": "1", "roomNo": "-", "soi": "-", "street": "-" }, "creditStatus": { "status": "NONE" }, "accountId": "200078606", "statusDescription": "Active", "collectionStatus": { "lastActivityDate": "2021-12-30T00:00:00.000+07:00", "status": "NONE" }, "withholdingTaxIndicator": "N", "name": { "nameType": "I", "firstName": "สัปปะรด", "lastName": "ผลไม้", "title": "คุณ" }, "openDate": "2019-03-27T00:00:00.000+07:00", "branchNo": "00000", "convergenceCode": "4PPremium", "taxId": "7175358721530", "dcbAmount": "0.00", "interestWaivingIndicator": "N", "debtAge": "0" }, "customer": { "creditLimitIndicator": "N", "income": "0", "creditClass": "X", "timeInBusiness": "0101 ", "occupation": "N", "totalProduct": "3", "birthDate": "1994-07-08T00:00:00.000+07:00", "lastActivityReasonCode": "CREQ", "customerType": { "code": "I", "description": "Individual" }, "lastActivityCode": "NEW_ACCOUNT", "nationality": "THA", "certificateNumber": "7175358721530", "contactLanguage": "TH", "largeCustomerIndicator": "N", "billCycleInfo": { "changeCycleRequestStatus": "N", "billCycle": { "code": "10", "description": "Monthly Cycle close on the 9" }, "changeCycleIndicator": "N" }, "customerId": "187374", "certificateExpirationDate": "2024-07-07T00:00:00.000+07:00", "offerCurrency": "THB", "effectiveDate": "2019-03-27T09:41:19.000+07:00", "certificateType": "I", "registerDate": "2019-03-27T00:00:00.000+07:00", "customerGrading": "NON-TOP" }, "invoiceSummary": { "interestFeeAmount": "0.00", "collectionFeeAmount": "0.00", "penaltyFeeAmount": "0.00", "dcbPurchaseAmount": "0.00", "overdueAmount": "0.00" } } ] }, "message": "Success.", "uuid": "5d51bb2f-af98-4007-82f8-04665052d886" } } } res.status(200).send(response) }