Commit 0f8247b9ffd6da226a86f729470f722204ff15ab
1 parent
d3d1849a
Exists in
develop
update mockup
Showing
9 changed files
with
286 additions
and
87 deletions
Show diff stats
app.js
@@ -277,7 +277,7 @@ app.post('/api/shop-cdns/upload', (req, res) => { | @@ -277,7 +277,7 @@ app.post('/api/shop-cdns/upload', (req, res) => { | ||
277 | }); | 277 | }); |
278 | 278 | ||
279 | var multipart = require('connect-multiparty'); | 279 | var multipart = require('connect-multiparty'); |
280 | -const { sortedUniq, result, reject } = require('lodash'); | 280 | +const { sortedUniq, result, reject, flatMap } = require('lodash'); |
281 | var multipartMiddleware = multipart({ uploadDir: './img' }); | 281 | var multipartMiddleware = multipart({ uploadDir: './img' }); |
282 | 282 | ||
283 | app.post('/api/shop-cdns/upload2', multipartMiddleware, async (req, res) => { | 283 | app.post('/api/shop-cdns/upload2', multipartMiddleware, async (req, res) => { |
@@ -380,6 +380,7 @@ app.post('/v1/MVP/enq/getMobileOfferInventory/', require('./true').getMobileOffe | @@ -380,6 +380,7 @@ app.post('/v1/MVP/enq/getMobileOfferInventory/', require('./true').getMobileOffe | ||
380 | app.post('/v1/get_AccountStatusHistoryList/', require('./true').getAccountStatusHistoryList); | 380 | app.post('/v1/get_AccountStatusHistoryList/', require('./true').getAccountStatusHistoryList); |
381 | app.post('/MGContractInfo/MGContractInfo/getContractHistoryList', require('./true').getContractHistoryList); | 381 | app.post('/MGContractInfo/MGContractInfo/getContractHistoryList', require('./true').getContractHistoryList); |
382 | app.post('/v1/get_ProductInfo/', require('./true').getProductInfo); | 382 | app.post('/v1/get_ProductInfo/', require('./true').getProductInfo); |
383 | +app.post('/broadband/mb_service/crm_api.php', require('./true').getProfile); | ||
383 | 384 | ||
384 | app.post('/api/v1/LG-API/notifySubscription', require('./lg').notifySubscription); | 385 | app.post('/api/v1/LG-API/notifySubscription', require('./lg').notifySubscription); |
385 | 386 | ||
@@ -437,6 +438,8 @@ app.post('/CCPGW_ServiceWeb/Services/QueryCDR', express.text({type:"*/*"}), requ | @@ -437,6 +438,8 @@ app.post('/CCPGW_ServiceWeb/Services/QueryCDR', express.text({type:"*/*"}), requ | ||
437 | 438 | ||
438 | app.get('/api/callback', require('./line').callback); | 439 | app.get('/api/callback', require('./line').callback); |
439 | 440 | ||
441 | +app.get('/v1/product/loyaltyProgramProdSpec/pointDetail.json', require('./point').getPointDetail); | ||
442 | + | ||
440 | app.post('/sendSMS', require('./sms').sendSMS); | 443 | app.post('/sendSMS', require('./sms').sendSMS); |
441 | 444 | ||
442 | 445 | ||
@@ -608,4 +611,28 @@ q.on('success', function (result, job) { | @@ -608,4 +611,28 @@ q.on('success', function (result, job) { | ||
608 | 611 | ||
609 | app.listen(port, () => console.log('app listening on port ' + port + '!')) | 612 | app.listen(port, () => console.log('app listening on port ' + port + '!')) |
610 | 613 | ||
611 | -//test | ||
612 | \ No newline at end of file | 614 | \ No newline at end of file |
615 | +//test | ||
616 | + | ||
617 | +test = () => { | ||
618 | + z = 0 | ||
619 | + j = 1 | ||
620 | + k = 0 | ||
621 | + while (!(j > 10)) { | ||
622 | + z = z + 1 | ||
623 | + k = 1 | ||
624 | + while(!(k > 10)) { | ||
625 | + k = k + 1 | ||
626 | + z = z + 1 | ||
627 | + } | ||
628 | + j = j + 1 | ||
629 | + } | ||
630 | + let a = "ABCDab" | ||
631 | + console.log(typeof a == 'string') | ||
632 | + if(typeof a == 'string') { | ||
633 | + console.log(a.toLowerCase()) | ||
634 | + } | ||
635 | + console.log(a) | ||
636 | + console.log(z) | ||
637 | +} | ||
638 | + | ||
639 | +test() | ||
613 | \ No newline at end of file | 640 | \ No newline at end of file |
ccbs.js
@@ -88,7 +88,58 @@ module.exports.assetDetail = async (req, res) => { | @@ -88,7 +88,58 @@ module.exports.assetDetail = async (req, res) => { | ||
88 | "installAddress": {} | 88 | "installAddress": {} |
89 | } | 89 | } |
90 | 90 | ||
91 | - res.status(200).send(response) | 91 | + let response2 = { |
92 | + "outstandingBalance": 0, | ||
93 | + "currentBillBalance": 0, | ||
94 | + "dueDate": "", | ||
95 | + "subStatus": { | ||
96 | + "FullSusMsg": "", | ||
97 | + "status": "Suspend", | ||
98 | + "detail": [{ | ||
99 | + "reason": "", | ||
100 | + "since": "" | ||
101 | + } | ||
102 | + ] | ||
103 | + }, | ||
104 | + "assetRowId": "1-KSBE3U", | ||
105 | + "serviceId": "9102000070", | ||
106 | + "productLine": "True Online", | ||
107 | + "startDate": "15/02/2017", | ||
108 | + "assetLifetime": "4 years, 11 months, 12 days", | ||
109 | + "preferredLanguage": "Thai-North (เหนือ)", | ||
110 | + "productType": "DOCSIS", | ||
111 | + "currentBillCycle": "", | ||
112 | + "credit": { | ||
113 | + "limit": 0, | ||
114 | + "available": 0, | ||
115 | + "defaultCredit": "", | ||
116 | + "temporary": "", | ||
117 | + "permanent": "", | ||
118 | + "expiryDate": "", | ||
119 | + "status": "", | ||
120 | + "totalObligation": 0 | ||
121 | + }, | ||
122 | + "discount": { | ||
123 | + "discountList": [], | ||
124 | + "discountIndicator": "-" | ||
125 | + }, | ||
126 | + "contract": { | ||
127 | + "contractIndicator": "-", | ||
128 | + "list": [] | ||
129 | + }, | ||
130 | + "installAddress": { | ||
131 | + "country": "Thailand", | ||
132 | + "postalCode": "10400", | ||
133 | + "province": "กรุงเทพมหานคร", | ||
134 | + "street": "ถ.ดินแดง", | ||
135 | + "house": "89", | ||
136 | + "khet": "ดินแดง", | ||
137 | + "khwang": "ดินแดง" | ||
138 | + }, | ||
139 | + "rvip": "" | ||
140 | +} | ||
141 | + | ||
142 | + res.status(200).send(response2) | ||
92 | } | 143 | } |
93 | 144 | ||
94 | module.exports.churnScoreOfferList = async (req, res) => { | 145 | module.exports.churnScoreOfferList = async (req, res) => { |
int.js
@@ -1210,14 +1210,14 @@ module.exports.getPayChannel = async (req, res) => { | @@ -1210,14 +1210,14 @@ module.exports.getPayChannel = async (req, res) => { | ||
1210 | "creditCardNo": "", | 1210 | "creditCardNo": "", |
1211 | "recurringFrequencyValue": "", | 1211 | "recurringFrequencyValue": "", |
1212 | "bankBranchName": "", | 1212 | "bankBranchName": "", |
1213 | - "bankAccountNo": "", | ||
1214 | - "bankName": "", | 1213 | + "bankAccountNo": "493121123", |
1214 | + "bankName": "ABC", | ||
1215 | "creditCardType": "", | 1215 | "creditCardType": "", |
1216 | "payChannelStatus": "O", | 1216 | "payChannelStatus": "O", |
1217 | "paymentType": "N", | 1217 | "paymentType": "N", |
1218 | "customerId": "187374", | 1218 | "customerId": "187374", |
1219 | "ddApprovalDate": "", | 1219 | "ddApprovalDate": "", |
1220 | - "bankCode": "", | 1220 | + "bankCode": "4931202119912309", |
1221 | "creditCardExpirationDate": "", | 1221 | "creditCardExpirationDate": "", |
1222 | "recurringAmount": "", | 1222 | "recurringAmount": "", |
1223 | "paymentCategory": "POST", | 1223 | "paymentCategory": "POST", |
@@ -1228,9 +1228,12 @@ module.exports.getPayChannel = async (req, res) => { | @@ -1228,9 +1228,12 @@ module.exports.getPayChannel = async (req, res) => { | ||
1228 | "payChannelNo": "200078606", | 1228 | "payChannelNo": "200078606", |
1229 | "bankBranchNo": "", | 1229 | "bankBranchNo": "", |
1230 | "billingArrangementNo": "1", | 1230 | "billingArrangementNo": "1", |
1231 | - "paymentMethod": "CA", | 1231 | + "paymentMethod": "DD", |
1232 | "openDate": "2019-03-27T00:00:00.000+07:00" | 1232 | "openDate": "2019-03-27T00:00:00.000+07:00" |
1233 | }, | 1233 | }, |
1234 | + // payChannelInfo.BankAccountNo | ||
1235 | + // paymentMethod.BankCode = payChannelInfo.BankCode | ||
1236 | + // paymentMethod.BankName = payChannelInfo.BankName | ||
1234 | "message": "Success.", | 1237 | "message": "Success.", |
1235 | "uuid": "c8f2d372-1ba2-49d7-9c8a-830a44af9977" | 1238 | "uuid": "c8f2d372-1ba2-49d7-9c8a-830a44af9977" |
1236 | } | 1239 | } |
intx.js
@@ -2276,5 +2276,5 @@ module.exports.getAccountInfo = async (req, res) => { | @@ -2276,5 +2276,5 @@ module.exports.getAccountInfo = async (req, res) => { | ||
2276 | } | 2276 | } |
2277 | 2277 | ||
2278 | 2278 | ||
2279 | - res.status(200).send(response1) | 2279 | + res.status(200).send(response) |
2280 | } | 2280 | } |
2281 | \ No newline at end of file | 2281 | \ No newline at end of file |
loadtest.js
@@ -53,22 +53,16 @@ function statusCallback(error, result, latency) { | @@ -53,22 +53,16 @@ function statusCallback(error, result, latency) { | ||
53 | // }; | 53 | // }; |
54 | 54 | ||
55 | const options = { | 55 | const options = { |
56 | - url: 'http://127.0.0.1:4000/point/v1/deleteCustomer', | ||
57 | - maxRequests: 2, | ||
58 | - requestsPerSecond: 2, | 56 | + url: 'http://localhost:9011/api/v1/register/scanDevice/TpZ3EgSQ', |
57 | + maxRequests: 1000, | ||
58 | + requestsPerSecond: 100, | ||
59 | headers : { | 59 | headers : { |
60 | "Content-Type":"application/json", | 60 | "Content-Type":"application/json", |
61 | - "x-app-id":"partnerId=30163; ptsAppKeyName=PICO|Browser|1.0.0", | ||
62 | - "x-transaction-id":"SACF-300519siwkxkw7du", | ||
63 | - "accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJuYW1lIjoidGVzdG5hbWUiLCJsYXN0bmFtZSI6InRlc3RsYXNuYW1lIiwiZW1haWwiOiJ0ZXN0QGdtYWlsLmNvbSIsInVzZXJuYW1lIjoiQURtaW4xMjM0IiwiaWF0IjoxNTk3MTE4MjM5fQ.PbZphEffSy6nBPhDzFneE1LtMWy6YpRumo8sjacjAEs", | ||
64 | - "X-Tid":"NI5smn3wWpoPX1ma2jbPiE8hK4QcDqHR1582013702233" | ||
65 | - }, | ||
66 | - method: "POST", | ||
67 | - body : { | ||
68 | - "enterpriseId": "ent0002", | ||
69 | - "userIdType": "0", | ||
70 | - "userIdData": "2020-P2-3000111@email_password" | 61 | + "x-transaction-id":"NI5smn3wWpoPX1ma2jbPiE8hK4QcDqHR1582013702233", |
62 | + "x-req-timestamp":"NI5smn3wWpoPX1ma2jbPiE8hK4QcDqHR1582013702233" | ||
71 | }, | 63 | }, |
64 | + method: "GET", | ||
65 | + body : null, | ||
72 | contentType : "application/json", | 66 | contentType : "application/json", |
73 | statusCallback: statusCallback | 67 | statusCallback: statusCallback |
74 | }; | 68 | }; |
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +module.exports.getPointDetail = async (req, res) => { | ||
2 | + console.log('===== GET pointDetail =====') | ||
3 | + console.log('url', req.originalUrl); | ||
4 | + console.log('headers', req.headers); | ||
5 | + console.log('query', req.query); | ||
6 | + console.log('params', req.params); | ||
7 | + | ||
8 | + let response = `{"resultCode":"20000","resultDescription":"Success","resultData":null} | ||
9 | +` | ||
10 | + | ||
11 | + res.set('content-type', 'application/json') | ||
12 | + | ||
13 | + res.send(response) | ||
14 | +} | ||
0 | \ No newline at end of file | 15 | \ No newline at end of file |
postpay_true.js
@@ -1768,7 +1768,7 @@ module.exports.getLastInvoiceList = async (req, res) => { | @@ -1768,7 +1768,7 @@ module.exports.getLastInvoiceList = async (req, res) => { | ||
1768 | } | 1768 | } |
1769 | } | 1769 | } |
1770 | 1770 | ||
1771 | - res.status(200).send(response) | 1771 | + res.status(200).send(response1) |
1772 | } | 1772 | } |
1773 | 1773 | ||
1774 | module.exports.getLastDocumentList = async (req, res) => { | 1774 | module.exports.getLastDocumentList = async (req, res) => { |
@@ -2353,94 +2353,94 @@ module.exports.getBalanceList = async (req, res) => { | @@ -2353,94 +2353,94 @@ module.exports.getBalanceList = async (req, res) => { | ||
2353 | "errorCode": "OSBbllngA00001", | 2353 | "errorCode": "OSBbllngA00001", |
2354 | "balanceList": { | 2354 | "balanceList": { |
2355 | "size": "1", | 2355 | "size": "1", |
2356 | - "balanceInfoArray": [ | ||
2357 | - { | 2356 | + "balanceInfoArray": [{ |
2358 | "account": { | 2357 | "account": { |
2359 | - "minDueDateIndicator": "N", | 2358 | + "minDueDateIndicator": "Y", |
2360 | "accountCollection": { | 2359 | "accountCollection": { |
2361 | "status": "NONE" | 2360 | "status": "NONE" |
2362 | }, | 2361 | }, |
2363 | "classify": "R", | 2362 | "classify": "R", |
2364 | - "maxDueDateIndicator": "N", | 2363 | + "maxDueDateIndicator": "Y", |
2365 | "accountSubType": { | 2364 | "accountSubType": { |
2366 | - "code": "RES", | ||
2367 | - "description": "Individual - Residential" | 2365 | + "code": "FIN", |
2366 | + "description": "RF-Individual" | ||
2368 | }, | 2367 | }, |
2368 | + "dueDate": "2021-11-05T00:00:00.000+07:00", | ||
2369 | "ben": { | 2369 | "ben": { |
2370 | - "consolidateIndicator": "Y", | 2370 | + "consolidateIndicator": "N", |
2371 | "billLanguage": "TH", | 2371 | "billLanguage": "TH", |
2372 | - "ben": "200078606", | ||
2373 | - "bcBanId": "700046423", | ||
2374 | - "billMedia": "S", | 2372 | + "ben": "200080855", |
2373 | + "bcBanId": "700040506", | ||
2374 | + "billMedia": "E", | ||
2375 | "status": { | 2375 | "status": { |
2376 | "code": "O", | 2376 | "code": "O", |
2377 | "description": "Open" | 2377 | "description": "Open" |
2378 | } | 2378 | } |
2379 | }, | 2379 | }, |
2380 | - "comingDueDateIndicator": "N", | ||
2381 | - "ouId": "115614", | 2380 | + "billStatement": { |
2381 | + "previousBalanceAmount": "6735.44", | ||
2382 | + "currentBillBalanceAmount": "6735.44", | ||
2383 | + "totalOverDueAmount": "961.93" | ||
2384 | + }, | ||
2385 | + "comingDueDateIndicator": "Y", | ||
2386 | + "ouId": "99199", | ||
2382 | "delinquent": "", | 2387 | "delinquent": "", |
2383 | "contact": { | 2388 | "contact": { |
2384 | - "homePhone": "0924971811", | ||
2385 | - "language": "TH", | ||
2386 | - "preferredContactNo": "0909230076" | 2389 | + "email": "-", |
2390 | + "homePhone": "0939580049", | ||
2391 | + "language": "TH" | ||
2387 | }, | 2392 | }, |
2388 | - "agreementId": "1344349", | ||
2389 | - "customerId": "187374", | 2393 | + "agreementId": "1287101", |
2394 | + "customerId": "171436", | ||
2390 | "creditLimit": { | 2395 | "creditLimit": { |
2391 | - "creditClass": "X", | ||
2392 | - "creditLimitReasonCode": "CREQ", | ||
2393 | - "personalCreditLimit": "0", | 2396 | + "creditClass": "A", |
2397 | + "creditLimitReasonCode": "G111", | ||
2398 | + "personalCreditLimit": "1000", | ||
2394 | "temporaryCreditLimit": "0", | 2399 | "temporaryCreditLimit": "0", |
2395 | - "obligationCalculationFormula": "Formula 3" | 2400 | + "obligationCalculationFormula": "Formula 1" |
2396 | }, | 2401 | }, |
2397 | "company": { | 2402 | "company": { |
2398 | - "code": "TI", | ||
2399 | - "description": "True Internet Corporation Company Limited" | 2403 | + "code": "RF", |
2404 | + "description": "True Move H Universal Communication Co., Ltd" | ||
2400 | }, | 2405 | }, |
2401 | - "arBalance": "0", | 2406 | + "arBalance": "6735.44", |
2402 | "address": { | 2407 | "address": { |
2403 | - "zipCode": "50200", | ||
2404 | - "city": "เชียงใหม่", | ||
2405 | - "addressType": "I", | ||
2406 | - "district": "เมืองเชียงใหม่", | ||
2407 | - "addressLine1": "137 * 1 * - *", | ||
2408 | - "houseNo": "137", | ||
2409 | - "addressLine2": "* UNI LOFT CHAINGMAI D * - * - * -", | ||
2410 | - "addressLine3": "* สุเทพ * เมืองเชียงใหม่", | ||
2411 | - "addressLine4": "เชียงใหม่ 50200", | ||
2412 | - "subDistrict": "สุเทพ", | ||
2413 | - "sinceDate": "2019-03-27T00:00:00.000+07:00", | ||
2414 | - "building": "UNI LOFT CHAINGMAI D", | ||
2415 | - "floor": "-", | ||
2416 | - "moo": "1", | ||
2417 | - "roomNo": "-", | ||
2418 | - "soi": "-", | ||
2419 | - "street": "-" | 2408 | + "zipCode": "10700", |
2409 | + "city": "กรุงเทพมหานคร", | ||
2410 | + "addressType": "B", | ||
2411 | + "district": "บางพลัด", | ||
2412 | + "addressLine1": "77 - ", | ||
2413 | + "houseNo": "77", | ||
2414 | + "addressLine2": " - ถ.จรัญสนิทวงศ์", | ||
2415 | + "addressLine3": " บางอ้อ * บางพลัด", | ||
2416 | + "addressLine4": "กรุงเทพมหานคร 10700", | ||
2417 | + "subDistrict": "บางอ้อ", | ||
2418 | + "sinceDate": "2019-06-25T11:41:45.000+07:00", | ||
2419 | + "building": "-", | ||
2420 | + "moo": "-", | ||
2421 | + "street": "ถ.จรัญสนิทวงศ์" | ||
2420 | }, | 2422 | }, |
2421 | "creditStatus": { | 2423 | "creditStatus": { |
2422 | "status": "NONE" | 2424 | "status": "NONE" |
2423 | }, | 2425 | }, |
2424 | - "accountId": "200078606", | 2426 | + "accountId": "200080855", |
2425 | "statusDescription": "Active", | 2427 | "statusDescription": "Active", |
2426 | "collectionStatus": { | 2428 | "collectionStatus": { |
2427 | - "lastActivityDate": "2021-12-30T00:00:00.000+07:00", | ||
2428 | "status": "NONE" | 2429 | "status": "NONE" |
2429 | }, | 2430 | }, |
2430 | "withholdingTaxIndicator": "N", | 2431 | "withholdingTaxIndicator": "N", |
2431 | "name": { | 2432 | "name": { |
2432 | "nameType": "I", | 2433 | "nameType": "I", |
2433 | - "firstName": "สัปปะรด", | ||
2434 | - "lastName": "ผลไม้", | 2434 | + "firstName": "หมีช่า", |
2435 | + "lastName": "ชูก้า", | ||
2435 | "title": "คุณ" | 2436 | "title": "คุณ" |
2436 | }, | 2437 | }, |
2437 | - "openDate": "2019-03-27T00:00:00.000+07:00", | 2438 | + "openDate": "2019-06-25T11:41:45.000+07:00", |
2438 | "branchNo": "00000", | 2439 | "branchNo": "00000", |
2439 | - "convergenceCode": "4PPremium", | ||
2440 | - "taxId": "7175358721530", | 2440 | + "taxId": "7041771944118", |
2441 | "dcbAmount": "0.00", | 2441 | "dcbAmount": "0.00", |
2442 | "interestWaivingIndicator": "N", | 2442 | "interestWaivingIndicator": "N", |
2443 | - "debtAge": "0" | 2443 | + "debtAge": "748" |
2444 | }, | 2444 | }, |
2445 | "customer": { | 2445 | "customer": { |
2446 | "creditLimitIndicator": "N", | 2446 | "creditLimitIndicator": "N", |
@@ -2448,8 +2448,8 @@ module.exports.getBalanceList = async (req, res) => { | @@ -2448,8 +2448,8 @@ module.exports.getBalanceList = async (req, res) => { | ||
2448 | "creditClass": "X", | 2448 | "creditClass": "X", |
2449 | "timeInBusiness": "0101 ", | 2449 | "timeInBusiness": "0101 ", |
2450 | "occupation": "N", | 2450 | "occupation": "N", |
2451 | - "totalProduct": "3", | ||
2452 | - "birthDate": "1994-07-08T00:00:00.000+07:00", | 2451 | + "totalProduct": "1", |
2452 | + "birthDate": "1996-11-16T00:00:00.000+07:00", | ||
2453 | "lastActivityReasonCode": "CREQ", | 2453 | "lastActivityReasonCode": "CREQ", |
2454 | "customerType": { | 2454 | "customerType": { |
2455 | "code": "I", | 2455 | "code": "I", |
@@ -2457,7 +2457,7 @@ module.exports.getBalanceList = async (req, res) => { | @@ -2457,7 +2457,7 @@ module.exports.getBalanceList = async (req, res) => { | ||
2457 | }, | 2457 | }, |
2458 | "lastActivityCode": "NEW_ACCOUNT", | 2458 | "lastActivityCode": "NEW_ACCOUNT", |
2459 | "nationality": "THA", | 2459 | "nationality": "THA", |
2460 | - "certificateNumber": "7175358721530", | 2460 | + "certificateNumber": "7041771944118", |
2461 | "contactLanguage": "TH", | 2461 | "contactLanguage": "TH", |
2462 | "largeCustomerIndicator": "N", | 2462 | "largeCustomerIndicator": "N", |
2463 | "billCycleInfo": { | 2463 | "billCycleInfo": { |
@@ -2468,12 +2468,12 @@ module.exports.getBalanceList = async (req, res) => { | @@ -2468,12 +2468,12 @@ module.exports.getBalanceList = async (req, res) => { | ||
2468 | }, | 2468 | }, |
2469 | "changeCycleIndicator": "N" | 2469 | "changeCycleIndicator": "N" |
2470 | }, | 2470 | }, |
2471 | - "customerId": "187374", | ||
2472 | - "certificateExpirationDate": "2024-07-07T00:00:00.000+07:00", | 2471 | + "customerId": "171436", |
2472 | + "certificateExpirationDate": "2020-11-07T00:00:00.000+07:00", | ||
2473 | "offerCurrency": "THB", | 2473 | "offerCurrency": "THB", |
2474 | - "effectiveDate": "2019-03-27T09:41:19.000+07:00", | 2474 | + "effectiveDate": "2019-06-25T11:41:45.000+07:00", |
2475 | "certificateType": "I", | 2475 | "certificateType": "I", |
2476 | - "registerDate": "2019-03-27T00:00:00.000+07:00", | 2476 | + "registerDate": "2019-06-25T00:00:00.000+07:00", |
2477 | "customerGrading": "NON-TOP" | 2477 | "customerGrading": "NON-TOP" |
2478 | }, | 2478 | }, |
2479 | "invoiceSummary": { | 2479 | "invoiceSummary": { |
@@ -2481,13 +2481,13 @@ module.exports.getBalanceList = async (req, res) => { | @@ -2481,13 +2481,13 @@ module.exports.getBalanceList = async (req, res) => { | ||
2481 | "collectionFeeAmount": "0.00", | 2481 | "collectionFeeAmount": "0.00", |
2482 | "penaltyFeeAmount": "0.00", | 2482 | "penaltyFeeAmount": "0.00", |
2483 | "dcbPurchaseAmount": "0.00", | 2483 | "dcbPurchaseAmount": "0.00", |
2484 | - "overdueAmount": "0.00" | 2484 | + "overdueAmount": "6735.44" |
2485 | } | 2485 | } |
2486 | } | 2486 | } |
2487 | ] | 2487 | ] |
2488 | }, | 2488 | }, |
2489 | "message": "Success.", | 2489 | "message": "Success.", |
2490 | - "uuid": "5d51bb2f-af98-4007-82f8-04665052d886" | 2490 | + "uuid": "eb97d941-58a7-4d9b-99ed-aba6b972e032" |
2491 | } | 2491 | } |
2492 | } | 2492 | } |
2493 | } | 2493 | } |
sms.js
@@ -4,13 +4,15 @@ module.exports.sendSMS = async (req, res) => { | @@ -4,13 +4,15 @@ module.exports.sendSMS = async (req, res) => { | ||
4 | console.log('headers', req.headers); | 4 | console.log('headers', req.headers); |
5 | console.log('query', req.query); | 5 | console.log('query', req.query); |
6 | console.log('params', req.params); | 6 | console.log('params', req.params); |
7 | + console.log('body', req.body); | ||
7 | 8 | ||
8 | - let response = `<XML> | ||
9 | - <STATUS>OK</STATUS> | ||
10 | - <DETAIL>SUCCESS</DETAIL> | ||
11 | - <SMID>1502000283578</SMID> | ||
12 | - </XML>` | 9 | + // let response = `<XML> |
10 | + // <STATUS>OK</STATUS> | ||
11 | + // <DETAIL>SUCCESS</DETAIL> | ||
12 | + // <SMID>1502000283578</SMID> | ||
13 | + // </XML>` | ||
13 | 14 | ||
15 | + let response = `{"resultCode":"20000","developerMessage":"success","SMID":"2000020227"}` | ||
14 | 16 | ||
15 | let responseErr = `<XML> | 17 | let responseErr = `<XML> |
16 | <STATUS>ERR</STATUS> | 18 | <STATUS>ERR</STATUS> |
@@ -18,5 +20,7 @@ module.exports.sendSMS = async (req, res) => { | @@ -18,5 +20,7 @@ module.exports.sendSMS = async (req, res) => { | ||
18 | <SMID></SMID> | 20 | <SMID></SMID> |
19 | </XML>` | 21 | </XML>` |
20 | 22 | ||
21 | - res.send(response) | 23 | + res.set('Content-type', 'text/plain') |
24 | + | ||
25 | + // res.status(200).send(response) | ||
22 | } | 26 | } |
23 | \ No newline at end of file | 27 | \ No newline at end of file |
true.js
@@ -376,8 +376,73 @@ module.exports.getContractHistoryList = async (req, res) => { | @@ -376,8 +376,73 @@ module.exports.getContractHistoryList = async (req, res) => { | ||
376 | } | 376 | } |
377 | } | 377 | } |
378 | } | 378 | } |
379 | + | ||
380 | + let response1 = { | ||
381 | + "getContractHistoryListResponse": { | ||
382 | + "return": { | ||
383 | + "uuid": "7b62ffd5-94b8-46ef-8872-2f47485c3243", | ||
384 | + "errorCode": "OSBbllngA00001", | ||
385 | + "message": "Success.", | ||
386 | + "totalSize": "2", | ||
387 | + "contractList": { | ||
388 | + "contractInfoArray": [ | ||
389 | + { | ||
390 | + "contractStartDate": "2020-06-19T00:00:00.000+07:00", | ||
391 | + "fee": "0", | ||
392 | + "contractNumber": "-", | ||
393 | + "remark": "-", | ||
394 | + "generateChargeYesNo": "N", | ||
395 | + "terminationDate": "", | ||
396 | + "offerServiceLevel": "C", | ||
397 | + "contractExpirationDate": "2021-06-19T18:37:28.000+07:00", | ||
398 | + "offerInstanceId": "1079488", | ||
399 | + "offerCode": "1080359", | ||
400 | + "proposition": { | ||
401 | + "code": "CVG000000000027", | ||
402 | + "description": "True Smart Choice (Premium)" | ||
403 | + }, | ||
404 | + "contractGroupCode": "CT_CVG", | ||
405 | + "contractGroupDescriptionThai": "แคมเปญบริการทรูมูฟเอชแบบรายเดือนพร้อมบริการร่วมทรูออนไลน์/ทรูวิชั่นส์", | ||
406 | + "contractGroupDescriptionEng": "Special Campaign for TrueMove H Postpay service with True Online/True Visions", | ||
407 | + "term": "12", | ||
408 | + "effectiveDate": "2020-06-19T18:37:33.000+07:00", | ||
409 | + "agreementSocSequence": "1079488", | ||
410 | + "parentSocSequence": null, | ||
411 | + "socType": "U" | ||
412 | + }, | ||
413 | + { | ||
414 | + "contractStartDate": "2020-06-12T00:00:00.000+07:00", | ||
415 | + "fee": "0", | ||
416 | + "contractNumber": "-", | ||
417 | + "remark": "-", | ||
418 | + "generateChargeYesNo": "N", | ||
419 | + "terminationDate": "", | ||
420 | + "offerServiceLevel": "C", | ||
421 | + "contractExpirationDate": "2099-01-01T00:00:00.000+07:00", | ||
422 | + "offerInstanceId": "1074179", | ||
423 | + "offerCode": "11929712", | ||
424 | + "proposition": { | ||
425 | + "code": "CVG000000000038", | ||
426 | + "description": "True Smart Choice (4PLite-FreeSim)" | ||
427 | + }, | ||
428 | + "contractGroupCode": "CT_CVG", | ||
429 | + "contractGroupDescriptionThai": "แคมเปญบริการทรูมูฟเอชแบบรายเดือนพร้อมบริการร่วมทรูออนไลน์/ทรูวิชั่นส์", | ||
430 | + "contractGroupDescriptionEng": "Special Campaign for TrueMove H Postpay service with True Online/True Visions", | ||
431 | + "term": "0", | ||
432 | + "effectiveDate": "2020-06-12T12:18:55.000+07:00", | ||
433 | + "agreementSocSequence": "1074179", | ||
434 | + "parentSocSequence": null, | ||
435 | + "socType": "U" | ||
436 | + } | ||
437 | + ], | ||
438 | + "size": "2" | ||
439 | + }, | ||
440 | + "calculatedPageSize": "100" | ||
441 | + } | ||
442 | + } | ||
443 | + } | ||
379 | 444 | ||
380 | - res.status(200).send(response) | 445 | + res.status(200).send(response1) |
381 | } | 446 | } |
382 | 447 | ||
383 | module.exports.getProductInfo = async (req, res) => { | 448 | module.exports.getProductInfo = async (req, res) => { |
@@ -540,4 +605,45 @@ module.exports.getProductInfo = async (req, res) => { | @@ -540,4 +605,45 @@ module.exports.getProductInfo = async (req, res) => { | ||
540 | 605 | ||
541 | 606 | ||
542 | res.status(200).send(response) | 607 | res.status(200).send(response) |
608 | +} | ||
609 | + | ||
610 | +module.exports.getProfile = async (req, res) => { | ||
611 | + console.log('===== POST getProfile =====') | ||
612 | + console.log('url', req.originalUrl); | ||
613 | + console.log('headers', req.headers); | ||
614 | + console.log('query', req.query); | ||
615 | + console.log('params', req.params); | ||
616 | + console.log('body', JSON.stringify(req.body)); | ||
617 | + | ||
618 | + let response = { | ||
619 | + "Resultcode": "0", | ||
620 | + "Description": "SUCCESS", | ||
621 | + "Customer_Detail": { | ||
622 | + "Cusid": "44718311", | ||
623 | + "Login": "9605000001", | ||
624 | + "Assetnum": "9605000001", | ||
625 | + "Domain": "fiberhome", | ||
626 | + "Status": "active", | ||
627 | + "Ban": "11026322", | ||
628 | + "Package_Name": "Fiber to the Home 100M/10M adv. payment 6 Mo (Q22015)", | ||
629 | + "Priceplan_Name": "Fiber to the Home 100M/10M adv. payment 6 Mo (Q22015)", | ||
630 | + "Priceplan_Speed": "100M/10M", | ||
631 | + "Code_Name": "PMSFT29-100", | ||
632 | + "Shuffle_Speed": "", | ||
633 | + "Vas_Speed": "", | ||
634 | + "Radius_Speed": "", | ||
635 | + "Credit_Remain": "Unlimited", | ||
636 | + "Create_Date": "2016-03-08 15:41:25", | ||
637 | + "Lastaccess_Date": "2016-03-08 15:41:25", | ||
638 | + "Expire_Date": "", | ||
639 | + "Remove_Date": "", | ||
640 | + "BBCaller_ID": "", | ||
641 | + "Authen_By": "BB_CallerID", | ||
642 | + "Max_Download": "Max speed not found", | ||
643 | + "Max_Upload": "Max speed not found" | ||
644 | + }, | ||
645 | + "Description_th": "" | ||
646 | + } | ||
647 | + | ||
648 | + res.status(200).send(response) | ||
543 | } | 649 | } |
544 | \ No newline at end of file | 650 | \ No newline at end of file |