Commit e45082dc3e4315138d9142ab59755c8d8833b540
1 parent
d03f8f59
Exists in
master
and in
1 other branch
update mockup
Showing
13 changed files
with
465 additions
and
31 deletions
Show diff stats
admd.js
@@ -26,20 +26,20 @@ module.exports.oauthToken = async (req, res) => { | @@ -26,20 +26,20 @@ module.exports.oauthToken = async (req, res) => { | ||
26 | 26 | ||
27 | response = {error : 'invalid_grant'} | 27 | response = {error : 'invalid_grant'} |
28 | } else { | 28 | } else { |
29 | - // response = { | ||
30 | - // "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzcmYuYWlzLmNvLnRoL3NjZiIsInN1YiI6InRva2VuX2F1dGhlbnRpY2F0aW9uX2NvZGUiLCJhdWQiOiJMdGFOa1d2K0MvcnMzbk8vVis3RFhLUkRmRk9wRkJNeUVrY0ROSXA5Z0ovdWhNK0RBenVoUlE9PSIsImV4cCI6MTU5MDgzMzM1MiwiaWF0IjoxNTkwNzQ2OTUyLCJqdGkiOiIxRnVaSTdvbW5jZDlrTTE2Vm9FQkJyIiwicGlkIjoiWHUwb082bWRJYkowcE43QWp1dEtNNUFpK3Y4ckliTTF1YVFIWjRwNzkwTT0iLCJjbGllbnQiOiJNekF4Tnprc1FWSldVbEJNUVZSR1QxSk5mRUp5YjNkelpYSjhNUzR3TGpBPSIsInNzaWQiOiI3NDdHU1M1Rk1rSnFjVTQ1S1VpTXd4IiwidWlkIjoiNjYxNTcwMDEyMDE2NjA3IiwiYXV0Ijp7InR5cGUiOiJlbWFpbF9wYXNzd29yZCIsImFjdGlvbiI6ImxvZ2luIn0sImlhbCI6IjEuMSJ9.6U4gC1geC-gp_CiTrQ9Ti470Fn8VbWENI94Oh-ZAOJw", | ||
31 | - // "token_type": "bearer", | ||
32 | - // "expires_in": 86400, | ||
33 | - // "refresh_token": "N3ZGS2o5TjhSRkFsbGZWWVdFdzUxNTkwNzQ2OTUx747GSS5FMkJqcU45KUiMws", | ||
34 | - // "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InVreE8xSDFmQXkifQ.eyJpc3MiOiJzcmYuYWlzLmNvLnRoL3NjZiIsInN1YiI6ImlkVG9rZW4iLCJhdWQiOiJMdGFOa1d2K0MvcnMzbk8vVis3RFhLUkRmRk9wRkJNeUVrY0ROSXA5Z0ovdWhNK0RBenVoUlE9PSIsImV4cCI6MTU5MDgzMzM1MSwiaWF0IjoxNTkwNzQ2OTUxLCJqdGkiOiJlenBuWGF2Nm55cTVGZGZ2TFJlaW9qIiwiYXV0Ijp7InR5cGUiOiJlbWFpbF9wYXNzd29yZCIsImFjdGlvbiI6ImxvZ2luIn0sIm5vbmNlIjoiU1JGUC0yMDA1MjlFS081OFBnMDRWQiIsImluZm8iOnsiZmlyc3RuYW1lIjoidGVzdGJyb2tlciIsImxhc3RuYW1lIjoidGVzdGJyb2tlciIsInVzZXJuYW1lIjoidGVzdGJyb2tlckBnbWFpbC5jb20iLCJhY2NvdW50Q2F0ZWdvcnkiOiJyZXNpZGVudGlhbCJ9fQ.gFOf3_vuE_K4KEDZLYoXqma6pL6B_HdA0SWpaErvI-s1ng3rH6PXtEy8-7H5c2W9Co10kWEXcXuMXBHTFqRLu9WBNU1v2MGV90wBJ5ujAW_YdaY1H5D0HMthQVPEt6Bda2gHk_TVqol-YQRBbRNNhNQaxb5PSpZxv9dTJ7B4zzM", | ||
35 | - // "refresh_token_expires_in": 86400 | ||
36 | - // } | ||
37 | - | ||
38 | response = { | 29 | response = { |
39 | - resultCode: "50103", | ||
40 | - resultDescription: 'admd something error' | 30 | + "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzcmYuYWlzLmNvLnRoL3NjZiIsInN1YiI6InRva2VuX2F1dGhlbnRpY2F0aW9uX2NvZGUiLCJhdWQiOiJMdGFOa1d2K0MvcnMzbk8vVis3RFhLUkRmRk9wRkJNeUVrY0ROSXA5Z0ovdWhNK0RBenVoUlE9PSIsImV4cCI6MTU5MDgzMzM1MiwiaWF0IjoxNTkwNzQ2OTUyLCJqdGkiOiIxRnVaSTdvbW5jZDlrTTE2Vm9FQkJyIiwicGlkIjoiWHUwb082bWRJYkowcE43QWp1dEtNNUFpK3Y4ckliTTF1YVFIWjRwNzkwTT0iLCJjbGllbnQiOiJNekF4Tnprc1FWSldVbEJNUVZSR1QxSk5mRUp5YjNkelpYSjhNUzR3TGpBPSIsInNzaWQiOiI3NDdHU1M1Rk1rSnFjVTQ1S1VpTXd4IiwidWlkIjoiNjYxNTcwMDEyMDE2NjA3IiwiYXV0Ijp7InR5cGUiOiJlbWFpbF9wYXNzd29yZCIsImFjdGlvbiI6ImxvZ2luIn0sImlhbCI6IjEuMSJ9.6U4gC1geC-gp_CiTrQ9Ti470Fn8VbWENI94Oh-ZAOJw", |
31 | + "token_type": "bearer", | ||
32 | + "expires_in": 86400, | ||
33 | + "refresh_token": "N3ZGS2o5TjhSRkFsbGZWWVdFdzUxNTkwNzQ2OTUx747GSS5FMkJqcU45KUiMws", | ||
34 | + "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InVreE8xSDFmQXkifQ.eyJpc3MiOiJzcmYuYWlzLmNvLnRoL3NjZiIsInN1YiI6ImlkVG9rZW4iLCJhdWQiOiJMdGFOa1d2K0MvcnMzbk8vVis3RFhLUkRmRk9wRkJNeUVrY0ROSXA5Z0ovdWhNK0RBenVoUlE9PSIsImV4cCI6MTU5MDgzMzM1MSwiaWF0IjoxNTkwNzQ2OTUxLCJqdGkiOiJlenBuWGF2Nm55cTVGZGZ2TFJlaW9qIiwiYXV0Ijp7InR5cGUiOiJlbWFpbF9wYXNzd29yZCIsImFjdGlvbiI6ImxvZ2luIn0sIm5vbmNlIjoiU1JGUC0yMDA1MjlFS081OFBnMDRWQiIsImluZm8iOnsiZmlyc3RuYW1lIjoidGVzdGJyb2tlciIsImxhc3RuYW1lIjoidGVzdGJyb2tlciIsInVzZXJuYW1lIjoidGVzdGJyb2tlckBnbWFpbC5jb20iLCJhY2NvdW50Q2F0ZWdvcnkiOiJyZXNpZGVudGlhbCJ9fQ.gFOf3_vuE_K4KEDZLYoXqma6pL6B_HdA0SWpaErvI-s1ng3rH6PXtEy8-7H5c2W9Co10kWEXcXuMXBHTFqRLu9WBNU1v2MGV90wBJ5ujAW_YdaY1H5D0HMthQVPEt6Bda2gHk_TVqol-YQRBbRNNhNQaxb5PSpZxv9dTJ7B4zzM", | ||
35 | + "refresh_token_expires_in": 86400 | ||
41 | } | 36 | } |
42 | 37 | ||
38 | + // response = { | ||
39 | + // resultCode: "50103", | ||
40 | + // resultDescription: 'admd something error' | ||
41 | + // } | ||
42 | + | ||
43 | // response = {error : 'invalid_grant'} | 43 | // response = {error : 'invalid_grant'} |
44 | 44 | ||
45 | } | 45 | } |
@@ -58,4 +58,27 @@ module.exports.logout = async (req, res) => { | @@ -58,4 +58,27 @@ module.exports.logout = async (req, res) => { | ||
58 | let response = {"state":"logout"} | 58 | let response = {"state":"logout"} |
59 | 59 | ||
60 | res.send(response) | 60 | res.send(response) |
61 | +} | ||
62 | + | ||
63 | +module.exports.validateToken = async (req, res) => { | ||
64 | + console.log('===== POST validateToken =====') | ||
65 | + console.log('url', req.originalUrl); | ||
66 | + console.log('headers', req.headers); | ||
67 | + console.log('query', req.query); | ||
68 | + console.log('params', req.params); | ||
69 | + console.log('body', req.body); | ||
70 | + | ||
71 | + let response = {"resultCode":"20000","developerMessage":"success"} | ||
72 | + // let response = { | ||
73 | + // "resultCode": "40401", | ||
74 | + // "developerMessage": "data_not_found", | ||
75 | + // "stackTrace": [{ | ||
76 | + // "node": "kms", | ||
77 | + // "ret": "0", | ||
78 | + // "resultCode": "40101", | ||
79 | + // "developerMessage": "Access denied" | ||
80 | + // }] | ||
81 | + // } | ||
82 | + | ||
83 | + res.send(response) | ||
61 | } | 84 | } |
62 | \ No newline at end of file | 85 | \ No newline at end of file |
app.js
@@ -384,18 +384,35 @@ app.delete('/api/v1/address_type', require('./d01').deleteAddressType); | @@ -384,18 +384,35 @@ app.delete('/api/v1/address_type', require('./d01').deleteAddressType); | ||
384 | 384 | ||
385 | app.post('/auth/v3.1/oauth/token', require('./admd').oauthToken); | 385 | app.post('/auth/v3.1/oauth/token', require('./admd').oauthToken); |
386 | app.post('/auth/v3.1/logout', require('./admd').logout); | 386 | app.post('/auth/v3.1/logout', require('./admd').logout); |
387 | +app.post('/validate/token', require('./admd').validateToken); | ||
388 | + | ||
389 | +app.post('/point/v1/deleteCustomer', require('./micro_point').deleteCustomer); | ||
390 | +app.post('/privilege/v1/history/delete', require('./privilege').deleteCustomer); | ||
387 | 391 | ||
388 | app.post('/v1/MVP/enq/getMobileOfferInventory/', require('./true').getMobileOfferInventory); | 392 | app.post('/v1/MVP/enq/getMobileOfferInventory/', require('./true').getMobileOfferInventory); |
389 | 393 | ||
390 | -app.post('/api/v1/mpay/billingonbehalf/partialRefundVolume.json', function (req, res) { | ||
391 | - // res.send({ | ||
392 | - // // refundVolumeV2Response : { | ||
393 | - // result: "SUCCESS", | ||
394 | - // resultDescription: "60713000154960518477", | ||
395 | - // endUserIdentifier: "66873381009", | ||
396 | - // networkType: "prepaid" | ||
397 | - // // } | ||
398 | - // }) | 394 | + app.get('/api/random/leader', function (req, res) { |
395 | + const months = ["เกมส์", "โน๊ต setup", "โน๊ต วัศรุต", "แบงค์", "มอส", "ปิ๊ค", "เต้นพอไม่ต้องตื่น", "เปา", "นัท", "kik", "new", "ann","na", "boky", "eve", "miki", "pla", "sugar"]; | ||
396 | + // const months = [ "ann"]; | ||
397 | + | ||
398 | + | ||
399 | + let object={} | ||
400 | + for(var i=0; i<100; i++) { | ||
401 | + const random = Math.floor(Math.random() * months.length); | ||
402 | + // console.log(random, months[random]); | ||
403 | + if(object[months[random]]) { | ||
404 | + object[months[random]] = object[months[random]] + 1; | ||
405 | + } else { | ||
406 | + object[months[random]] = 1 | ||
407 | + } | ||
408 | + } | ||
409 | + | ||
410 | + | ||
411 | + console.log(object); | ||
412 | + | ||
413 | + res.send(object); | ||
399 | }) | 414 | }) |
400 | 415 | ||
416 | + | ||
417 | + | ||
401 | app.listen(port, () => console.log('app listening on port ' + port + '!')) | 418 | app.listen(port, () => console.log('app listening on port ' + port + '!')) |
402 | \ No newline at end of file | 419 | \ No newline at end of file |
@@ -0,0 +1,104 @@ | @@ -0,0 +1,104 @@ | ||
1 | +const express = require('express') | ||
2 | +const app = express() | ||
3 | + | ||
4 | +app.post('/api/v2/aaf/eligibleService.json', function (req, res) { | ||
5 | + res.send({ | ||
6 | + resultCode:"20000", | ||
7 | + developerMessage:"Success" | ||
8 | + }) | ||
9 | + }) | ||
10 | + // app.post('/api/v2/aaf/eligibleService.json', function (req, res) { | ||
11 | + // res.send({ | ||
12 | + // resultCode: "40401", | ||
13 | + // developerMessage: "Data Not Found", | ||
14 | + // } | ||
15 | + // ) | ||
16 | + // }) | ||
17 | + | ||
18 | + app.post('/api/v1/mpay/billingonbehalf/reserveAndChargeVolume.json', function (req, res) { | ||
19 | + res.send({ | ||
20 | + "resultCode": "20000", | ||
21 | + "resultDescription": "Success", | ||
22 | + "resultData": [ | ||
23 | + ] | ||
24 | + } | ||
25 | + ) | ||
26 | + }) | ||
27 | + | ||
28 | + app.post('/api/v1/phx-inventory/jboss/inquiryCashStock', function (req, res) { | ||
29 | + res.send({ | ||
30 | + "resultCode": "20000", | ||
31 | + "resultDescription": "Success", | ||
32 | + "resultData": [ | ||
33 | + ] | ||
34 | + } | ||
35 | + ) | ||
36 | + }) | ||
37 | + | ||
38 | + app.get('/api/v1/phx-inventory/jboss/inquiryCashStock', function (req, res) { | ||
39 | + res.send({ | ||
40 | + "resultCode": "20000", | ||
41 | + "resultDescription": "Success", | ||
42 | + "resultData": [ | ||
43 | + ] | ||
44 | + }) | ||
45 | + }) | ||
46 | + | ||
47 | + // app.post('/api/v1/mpay/billingonbehalf/reserveAndChargeVolume.json', function (req, res) { | ||
48 | + // res.send({ | ||
49 | + // resultCode : "40400", | ||
50 | + // developerMessage : "Url not found", | ||
51 | + // userMessage:null, | ||
52 | + // moreInfo: "http://smaf.pantry.ais/errors/12345", | ||
53 | + // refundVolumeV2Response : { | ||
54 | + // result:null, | ||
55 | + // resultDescription:null, | ||
56 | + // endUserIdentify:null, | ||
57 | + // networkType:null | ||
58 | + // } | ||
59 | + // }) | ||
60 | + // }) | ||
61 | + | ||
62 | + // app.post('/api/v1/mpay/billingonbehalf/reserveAndChargeVolume.json', function (req, res) { | ||
63 | + // res.send({ | ||
64 | + // developerMessage : null, | ||
65 | + // userMessage: null, | ||
66 | + // resultCode : null, | ||
67 | + // moreInfo: null, | ||
68 | + // reserveAndChargeVolumeResponse : { | ||
69 | + // result: "SVC1300", | ||
70 | + // resultDescription: "UNKNOW_MSISDN", | ||
71 | + // endUserIdentifier: "66873381009", | ||
72 | + // networkType: null | ||
73 | + // } | ||
74 | + // } | ||
75 | + // ) | ||
76 | + // }) | ||
77 | + | ||
78 | + app.post('/api/v3/outRedirect/', function (req, res) { | ||
79 | + res.send({ | ||
80 | + ret_code: "SUCCESS", | ||
81 | + ret_msg: "SUCCESS" | ||
82 | + }) | ||
83 | + }) | ||
84 | + // app.post('/api/v3/outRedirect/', function (req, res) { | ||
85 | + // res.send({ | ||
86 | + // sub_msg: "40401", | ||
87 | + // sub_code: "APP_ID_NOT_EXIST", | ||
88 | + // ret_msg: "APP 信息检查失败", | ||
89 | + // ret_code: "FAIL" | ||
90 | + // }) | ||
91 | + // }) | ||
92 | + | ||
93 | + app.post('/api/v1/mpay/billingonbehalf/partialRefundVolume.json', function (req, res) { | ||
94 | + res.send({ | ||
95 | + // refundVolumeV2Response : { | ||
96 | + result: "SUCCESS", | ||
97 | + resultDescription: "60713000154960518477", | ||
98 | + endUserIdentifier: "66873381009", | ||
99 | + networkType: "prepaid" | ||
100 | + // } | ||
101 | + }) | ||
102 | + }) | ||
103 | + | ||
104 | +app.listen(3002); | ||
0 | \ No newline at end of file | 105 | \ No newline at end of file |
apple.js
@@ -33,7 +33,7 @@ module.exports.verifyReceipt = async (req, res) => { | @@ -33,7 +33,7 @@ module.exports.verifyReceipt = async (req, res) => { | ||
33 | "expires_date_ms":"1594702522000", | 33 | "expires_date_ms":"1594702522000", |
34 | "purchase_date_ms":"1594702222000", | 34 | "purchase_date_ms":"1594702222000", |
35 | "is_upgraded":null, | 35 | "is_upgraded":null, |
36 | - "product_id":"NG_PLAY_PREMIUM_APPLE_TV_Corp_99Months", | 36 | + "product_id":"AllEnglishMonthly", |
37 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", | 37 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", |
38 | "web_order_line_item_id":"1000000054018869" | 38 | "web_order_line_item_id":"1000000054018869" |
39 | },{ | 39 | },{ |
@@ -57,7 +57,7 @@ module.exports.verifyReceipt = async (req, res) => { | @@ -57,7 +57,7 @@ module.exports.verifyReceipt = async (req, res) => { | ||
57 | "expires_date_ms":"1594702522000", | 57 | "expires_date_ms":"1594702522000", |
58 | "purchase_date_ms":"1594702222000", | 58 | "purchase_date_ms":"1594702222000", |
59 | "is_upgraded":null, | 59 | "is_upgraded":null, |
60 | - "product_id":"NG_PLAY_PREMIUM_APPLE_TV_Corp_99Months", | 60 | + "product_id":"AllEnglishMonthly", |
61 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", | 61 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", |
62 | "web_order_line_item_id":"1000000054018869" | 62 | "web_order_line_item_id":"1000000054018869" |
63 | },{ | 63 | },{ |
@@ -81,7 +81,7 @@ module.exports.verifyReceipt = async (req, res) => { | @@ -81,7 +81,7 @@ module.exports.verifyReceipt = async (req, res) => { | ||
81 | "expires_date_ms":"1594702522000", | 81 | "expires_date_ms":"1594702522000", |
82 | "purchase_date_ms":"1594702222000", | 82 | "purchase_date_ms":"1594702222000", |
83 | "is_upgraded":null, | 83 | "is_upgraded":null, |
84 | - "product_id":"NG_PLAY_PREMIUM_APPLE_TV_Corp_99Months", | 84 | + "product_id":"AllEnglishMonthly", |
85 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", | 85 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", |
86 | "web_order_line_item_id":"1000000054018869" | 86 | "web_order_line_item_id":"1000000054018869" |
87 | },{ | 87 | },{ |
@@ -105,7 +105,7 @@ module.exports.verifyReceipt = async (req, res) => { | @@ -105,7 +105,7 @@ module.exports.verifyReceipt = async (req, res) => { | ||
105 | "expires_date_ms":"1594702522000", | 105 | "expires_date_ms":"1594702522000", |
106 | "purchase_date_ms":"1594702222000", | 106 | "purchase_date_ms":"1594702222000", |
107 | "is_upgraded":null, | 107 | "is_upgraded":null, |
108 | - "product_id":"NG_PLAY_PREMIUM_APPLE_TV_Corp_99Months", | 108 | + "product_id":"AllEnglishMonthly", |
109 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", | 109 | "purchase_date":"2020-07-14 04:50:22 Etc/GMT", |
110 | "web_order_line_item_id":"1000000054018869" | 110 | "web_order_line_item_id":"1000000054018869" |
111 | } | 111 | } |
d01.js
@@ -37,7 +37,7 @@ module.exports.getCustomer = async (req, res) => { | @@ -37,7 +37,7 @@ module.exports.getCustomer = async (req, res) => { | ||
37 | let response = { | 37 | let response = { |
38 | "resultCode": "20000", | 38 | "resultCode": "20000", |
39 | "resultDescription": "Success", | 39 | "resultDescription": "Success", |
40 | - "resultData": null | 40 | + "resultData": data |
41 | } | 41 | } |
42 | 42 | ||
43 | res.send(response) | 43 | res.send(response) |
@@ -0,0 +1,61 @@ | @@ -0,0 +1,61 @@ | ||
1 | +const loadtest = require('loadtest'); | ||
2 | + | ||
3 | +function statusCallback(error, result, latency) { | ||
4 | + console.log('Current latency %j, result %j, error %j', latency, result, error); | ||
5 | + console.log('----'); | ||
6 | + if(result) { | ||
7 | + console.log('Request elapsed milliseconds: ', result.requestElapsed); | ||
8 | + console.log('Request index: ', result.requestIndex); | ||
9 | + console.log('Request loadtest() instance index: ', result.instanceIndex); | ||
10 | + } | ||
11 | +} | ||
12 | + | ||
13 | +const options = { | ||
14 | + url: 'http://127.0.0.1:5001/api/v3/mpay/billingonbehalf/reserveAndChargeVolume.json', | ||
15 | + maxRequests: 10000, | ||
16 | + requestsPerSecond: 100, | ||
17 | + headers : { | ||
18 | + "Content-Type":"application/json", | ||
19 | + "x-app":"partnerId=30163; ptsAppKeyName=PICO|Browser|1.0.0", | ||
20 | + "x-tid":"SACF-300519siwkxkw7du", | ||
21 | + "X-Public-Id":"sgltest7@corp.ais900dev.org", | ||
22 | + "X-Private-Id":"NI5smn3wWpoPX1ma2jbPiE8hK4QcDqHR1582013702233" | ||
23 | + }, | ||
24 | + method: "POST", | ||
25 | + body : { | ||
26 | + "endUserIdentifier":"66932019877", | ||
27 | + "volume":"0", | ||
28 | + "out_trade_no":"nw424bc0bb690c73518a762a2d1a339d7f_COINS12000_20190219095515", | ||
29 | + "subject":"Purchased 12000 coins.", | ||
30 | + "pay_time":"2020-03-24 20:20:20", | ||
31 | + "device_id":"90c73518a762a2d1a339d7f", | ||
32 | + "buyer_pay_fee":"Paid by user", | ||
33 | + "coupon_fee":"20", | ||
34 | + "terminal_type":"IOS", | ||
35 | + "billingText":"test", | ||
36 | + "parameters":{ | ||
37 | + "amount":"0", | ||
38 | + "serviceNumber":"35000900022", | ||
39 | + "serviceType":"Download", | ||
40 | + "transactionID":"50609152601999918991", | ||
41 | + "currency":"THB", | ||
42 | + "taxDev":"0", | ||
43 | + "productCode":"Purchased 12000 coins that can be spent on weapons.", | ||
44 | + "productInfo":"COINS12000", | ||
45 | + "merchantContact":"MerchantContactTest", | ||
46 | + "cct":"0", | ||
47 | + "expireDate":"20200523142045", | ||
48 | + "senderName":"Huawei" | ||
49 | + } | ||
50 | + }, | ||
51 | + contentType : "application/json", | ||
52 | + statusCallback: statusCallback | ||
53 | +}; | ||
54 | + | ||
55 | +loadtest.loadTest(options, function(error) { | ||
56 | + if (error) { | ||
57 | + return console.error('Got an error: %s', error); | ||
58 | + } | ||
59 | + console.log('Tests run successfully'); | ||
60 | +}); | ||
61 | + |
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +module.exports.deleteCustomer = async (req, res) => { | ||
2 | + console.log('===== POST deleleMicroCustomer =====') | ||
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 | + console.log('body', req.body); | ||
8 | + | ||
9 | + let response = { | ||
10 | + resultCode: "50000", | ||
11 | + resultDescription: "Success", | ||
12 | + matchedDN: "", | ||
13 | + diagnosticMessage: "", | ||
14 | + rowCount: "1" | ||
15 | + } | ||
16 | + | ||
17 | + // res.status(200).send(response) | ||
18 | +} |
nafa.js
@@ -11,7 +11,7 @@ module.exports.packagePayment = async (req, res) => { | @@ -11,7 +11,7 @@ module.exports.packagePayment = async (req, res) => { | ||
11 | "resultMessage": "Success", | 11 | "resultMessage": "Success", |
12 | "data": { | 12 | "data": { |
13 | "statusCode": "003", | 13 | "statusCode": "003", |
14 | - "statusDescription": "Purchase package success" | 14 | + "statusDescription": "This mobile number already redeem this free package." |
15 | } | 15 | } |
16 | } | 16 | } |
17 | 17 | ||
@@ -37,5 +37,5 @@ module.exports.cancelPackage = async (req, res) => { | @@ -37,5 +37,5 @@ module.exports.cancelPackage = async (req, res) => { | ||
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
40 | - // res.status(200).send(response) | 40 | + res.status(200).send(response) |
41 | } | 41 | } |
package-lock.json
@@ -34,6 +34,19 @@ | @@ -34,6 +34,19 @@ | ||
34 | "xpath.js": "~1.1.0" | 34 | "xpath.js": "~1.1.0" |
35 | } | 35 | } |
36 | }, | 36 | }, |
37 | + "agent-base": { | ||
38 | + "version": "4.3.0", | ||
39 | + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", | ||
40 | + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", | ||
41 | + "requires": { | ||
42 | + "es6-promisify": "^5.0.0" | ||
43 | + } | ||
44 | + }, | ||
45 | + "agentkeepalive": { | ||
46 | + "version": "2.2.0", | ||
47 | + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-2.2.0.tgz", | ||
48 | + "integrity": "sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8=" | ||
49 | + }, | ||
37 | "ajv": { | 50 | "ajv": { |
38 | "version": "6.12.0", | 51 | "version": "6.12.0", |
39 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", | 52 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", |
@@ -1193,6 +1206,15 @@ | @@ -1193,6 +1206,15 @@ | ||
1193 | "delayed-stream": "~1.0.0" | 1206 | "delayed-stream": "~1.0.0" |
1194 | } | 1207 | } |
1195 | }, | 1208 | }, |
1209 | + "confinode": { | ||
1210 | + "version": "2.1.1", | ||
1211 | + "resolved": "https://registry.npmjs.org/confinode/-/confinode-2.1.1.tgz", | ||
1212 | + "integrity": "sha512-u5u0ZHpYMnVWtelxjalNtLvL+SdP7B/7s0JTFUIkyvqqIf67DAvy6SKaE6WZiwbufLPk+6zJKsh5SdpbtbFi9g==", | ||
1213 | + "requires": { | ||
1214 | + "quick-lru": "^5.0.0", | ||
1215 | + "yaml": "^1.7.2" | ||
1216 | + } | ||
1217 | + }, | ||
1196 | "connect-multiparty": { | 1218 | "connect-multiparty": { |
1197 | "version": "2.2.0", | 1219 | "version": "2.2.0", |
1198 | "resolved": "https://registry.npmjs.org/connect-multiparty/-/connect-multiparty-2.2.0.tgz", | 1220 | "resolved": "https://registry.npmjs.org/connect-multiparty/-/connect-multiparty-2.2.0.tgz", |
@@ -1249,6 +1271,15 @@ | @@ -1249,6 +1271,15 @@ | ||
1249 | "vary": "^1" | 1271 | "vary": "^1" |
1250 | } | 1272 | } |
1251 | }, | 1273 | }, |
1274 | + "d": { | ||
1275 | + "version": "1.0.1", | ||
1276 | + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", | ||
1277 | + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", | ||
1278 | + "requires": { | ||
1279 | + "es5-ext": "^0.10.50", | ||
1280 | + "type": "^1.0.1" | ||
1281 | + } | ||
1282 | + }, | ||
1252 | "dashdash": { | 1283 | "dashdash": { |
1253 | "version": "1.14.1", | 1284 | "version": "1.14.1", |
1254 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", | 1285 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", |
@@ -1332,6 +1363,48 @@ | @@ -1332,6 +1363,48 @@ | ||
1332 | "resolved": "https://registry.npmjs.org/envconf/-/envconf-0.0.4.tgz", | 1363 | "resolved": "https://registry.npmjs.org/envconf/-/envconf-0.0.4.tgz", |
1333 | "integrity": "sha1-hWda+6I3xD+Y3i1GrcDlMqTc9Is=" | 1364 | "integrity": "sha1-hWda+6I3xD+Y3i1GrcDlMqTc9Is=" |
1334 | }, | 1365 | }, |
1366 | + "es5-ext": { | ||
1367 | + "version": "0.10.53", | ||
1368 | + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", | ||
1369 | + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", | ||
1370 | + "requires": { | ||
1371 | + "es6-iterator": "~2.0.3", | ||
1372 | + "es6-symbol": "~3.1.3", | ||
1373 | + "next-tick": "~1.0.0" | ||
1374 | + } | ||
1375 | + }, | ||
1376 | + "es6-iterator": { | ||
1377 | + "version": "2.0.3", | ||
1378 | + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", | ||
1379 | + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", | ||
1380 | + "requires": { | ||
1381 | + "d": "1", | ||
1382 | + "es5-ext": "^0.10.35", | ||
1383 | + "es6-symbol": "^3.1.1" | ||
1384 | + } | ||
1385 | + }, | ||
1386 | + "es6-promise": { | ||
1387 | + "version": "4.2.8", | ||
1388 | + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", | ||
1389 | + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" | ||
1390 | + }, | ||
1391 | + "es6-promisify": { | ||
1392 | + "version": "5.0.0", | ||
1393 | + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", | ||
1394 | + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", | ||
1395 | + "requires": { | ||
1396 | + "es6-promise": "^4.0.3" | ||
1397 | + } | ||
1398 | + }, | ||
1399 | + "es6-symbol": { | ||
1400 | + "version": "3.1.3", | ||
1401 | + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", | ||
1402 | + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", | ||
1403 | + "requires": { | ||
1404 | + "d": "^1.0.1", | ||
1405 | + "ext": "^1.1.2" | ||
1406 | + } | ||
1407 | + }, | ||
1335 | "escape-html": { | 1408 | "escape-html": { |
1336 | "version": "1.0.3", | 1409 | "version": "1.0.3", |
1337 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", | 1410 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", |
@@ -1379,6 +1452,21 @@ | @@ -1379,6 +1452,21 @@ | ||
1379 | "vary": "~1.1.2" | 1452 | "vary": "~1.1.2" |
1380 | } | 1453 | } |
1381 | }, | 1454 | }, |
1455 | + "ext": { | ||
1456 | + "version": "1.4.0", | ||
1457 | + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", | ||
1458 | + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", | ||
1459 | + "requires": { | ||
1460 | + "type": "^2.0.0" | ||
1461 | + }, | ||
1462 | + "dependencies": { | ||
1463 | + "type": { | ||
1464 | + "version": "2.1.0", | ||
1465 | + "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", | ||
1466 | + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" | ||
1467 | + } | ||
1468 | + } | ||
1469 | + }, | ||
1382 | "extend": { | 1470 | "extend": { |
1383 | "version": "3.0.2", | 1471 | "version": "3.0.2", |
1384 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", | 1472 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", |
@@ -1504,6 +1592,30 @@ | @@ -1504,6 +1592,30 @@ | ||
1504 | "sshpk": "^1.7.0" | 1592 | "sshpk": "^1.7.0" |
1505 | } | 1593 | } |
1506 | }, | 1594 | }, |
1595 | + "https-proxy-agent": { | ||
1596 | + "version": "2.2.4", | ||
1597 | + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", | ||
1598 | + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", | ||
1599 | + "requires": { | ||
1600 | + "agent-base": "^4.3.0", | ||
1601 | + "debug": "^3.1.0" | ||
1602 | + }, | ||
1603 | + "dependencies": { | ||
1604 | + "debug": { | ||
1605 | + "version": "3.2.6", | ||
1606 | + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", | ||
1607 | + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", | ||
1608 | + "requires": { | ||
1609 | + "ms": "^2.1.1" | ||
1610 | + } | ||
1611 | + }, | ||
1612 | + "ms": { | ||
1613 | + "version": "2.1.2", | ||
1614 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | ||
1615 | + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" | ||
1616 | + } | ||
1617 | + } | ||
1618 | + }, | ||
1507 | "iconv-lite": { | 1619 | "iconv-lite": { |
1508 | "version": "0.4.24", | 1620 | "version": "0.4.24", |
1509 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", | 1621 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", |
@@ -1620,11 +1732,30 @@ | @@ -1620,11 +1732,30 @@ | ||
1620 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", | 1732 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", |
1621 | "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" | 1733 | "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" |
1622 | }, | 1734 | }, |
1735 | + "loadtest": { | ||
1736 | + "version": "5.0.4", | ||
1737 | + "resolved": "https://registry.npmjs.org/loadtest/-/loadtest-5.0.4.tgz", | ||
1738 | + "integrity": "sha512-aurXBsrQ39SGmt+V4uMf96ijrKN/hXJkFuGThWAUvDwr1tva5rhBdro5FYzzBWjJRXoM6zcuvVcVCCrVu1UzfA==", | ||
1739 | + "requires": { | ||
1740 | + "agentkeepalive": "^2.0.3", | ||
1741 | + "confinode": "^2.1.1", | ||
1742 | + "https-proxy-agent": "^2.2.1", | ||
1743 | + "log": "1.4.*", | ||
1744 | + "stdio": "^0.2.3", | ||
1745 | + "testing": "^1.1.1", | ||
1746 | + "websocket": "^1.0.28" | ||
1747 | + } | ||
1748 | + }, | ||
1623 | "lodash": { | 1749 | "lodash": { |
1624 | "version": "4.17.15", | 1750 | "version": "4.17.15", |
1625 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", | 1751 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", |
1626 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" | 1752 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" |
1627 | }, | 1753 | }, |
1754 | + "log": { | ||
1755 | + "version": "1.4.0", | ||
1756 | + "resolved": "https://registry.npmjs.org/log/-/log-1.4.0.tgz", | ||
1757 | + "integrity": "sha1-S6HYkP3iSbAx3KA7w36q8yVlbxw=" | ||
1758 | + }, | ||
1628 | "md5.js": { | 1759 | "md5.js": { |
1629 | "version": "1.3.4", | 1760 | "version": "1.3.4", |
1630 | "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", | 1761 | "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", |
@@ -1806,11 +1937,21 @@ | @@ -1806,11 +1937,21 @@ | ||
1806 | "repl.history": "^0.1.4" | 1937 | "repl.history": "^0.1.4" |
1807 | } | 1938 | } |
1808 | }, | 1939 | }, |
1940 | + "nan": { | ||
1941 | + "version": "2.14.1", | ||
1942 | + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", | ||
1943 | + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" | ||
1944 | + }, | ||
1809 | "negotiator": { | 1945 | "negotiator": { |
1810 | "version": "0.6.2", | 1946 | "version": "0.6.2", |
1811 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", | 1947 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", |
1812 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" | 1948 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" |
1813 | }, | 1949 | }, |
1950 | + "next-tick": { | ||
1951 | + "version": "1.0.0", | ||
1952 | + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", | ||
1953 | + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" | ||
1954 | + }, | ||
1814 | "node-json-config": { | 1955 | "node-json-config": { |
1815 | "version": "0.0.5", | 1956 | "version": "0.0.5", |
1816 | "resolved": "https://registry.npmjs.org/node-json-config/-/node-json-config-0.0.5.tgz", | 1957 | "resolved": "https://registry.npmjs.org/node-json-config/-/node-json-config-0.0.5.tgz", |
@@ -1883,6 +2024,11 @@ | @@ -1883,6 +2024,11 @@ | ||
1883 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", | 2024 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", |
1884 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" | 2025 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" |
1885 | }, | 2026 | }, |
2027 | + "quick-lru": { | ||
2028 | + "version": "5.1.1", | ||
2029 | + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", | ||
2030 | + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" | ||
2031 | + }, | ||
1886 | "random-bytes": { | 2032 | "random-bytes": { |
1887 | "version": "1.0.0", | 2033 | "version": "1.0.0", |
1888 | "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", | 2034 | "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", |
@@ -2087,11 +2233,24 @@ | @@ -2087,11 +2233,24 @@ | ||
2087 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", | 2233 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", |
2088 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" | 2234 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" |
2089 | }, | 2235 | }, |
2236 | + "stdio": { | ||
2237 | + "version": "0.2.7", | ||
2238 | + "resolved": "https://registry.npmjs.org/stdio/-/stdio-0.2.7.tgz", | ||
2239 | + "integrity": "sha1-ocV9oQ/hz6oMO/aDydB0PRtmCDk=" | ||
2240 | + }, | ||
2090 | "string_decoder": { | 2241 | "string_decoder": { |
2091 | "version": "0.10.31", | 2242 | "version": "0.10.31", |
2092 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", | 2243 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", |
2093 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" | 2244 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" |
2094 | }, | 2245 | }, |
2246 | + "testing": { | ||
2247 | + "version": "1.1.2", | ||
2248 | + "resolved": "https://registry.npmjs.org/testing/-/testing-1.1.2.tgz", | ||
2249 | + "integrity": "sha512-+wHrDL29KsI3NQtgGmgdZ/MaUZhnVePbt5ZfiMn6ntDpv/kMWfdiBrg/lJqntor9H8+zQYxvfPLVowPPs1nVEg==", | ||
2250 | + "requires": { | ||
2251 | + "log": "1.4.0" | ||
2252 | + } | ||
2253 | + }, | ||
2095 | "through": { | 2254 | "through": { |
2096 | "version": "2.3.8", | 2255 | "version": "2.3.8", |
2097 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", | 2256 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", |
@@ -2129,6 +2288,11 @@ | @@ -2129,6 +2288,11 @@ | ||
2129 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", | 2288 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", |
2130 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" | 2289 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" |
2131 | }, | 2290 | }, |
2291 | + "type": { | ||
2292 | + "version": "1.2.0", | ||
2293 | + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", | ||
2294 | + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" | ||
2295 | + }, | ||
2132 | "type-is": { | 2296 | "type-is": { |
2133 | "version": "1.6.18", | 2297 | "version": "1.6.18", |
2134 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", | 2298 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", |
@@ -2138,6 +2302,14 @@ | @@ -2138,6 +2302,14 @@ | ||
2138 | "mime-types": "~2.1.24" | 2302 | "mime-types": "~2.1.24" |
2139 | } | 2303 | } |
2140 | }, | 2304 | }, |
2305 | + "typedarray-to-buffer": { | ||
2306 | + "version": "3.1.5", | ||
2307 | + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", | ||
2308 | + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", | ||
2309 | + "requires": { | ||
2310 | + "is-typedarray": "^1.0.0" | ||
2311 | + } | ||
2312 | + }, | ||
2141 | "uid-safe": { | 2313 | "uid-safe": { |
2142 | "version": "2.1.5", | 2314 | "version": "2.1.5", |
2143 | "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", | 2315 | "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", |
@@ -2257,6 +2429,18 @@ | @@ -2257,6 +2429,18 @@ | ||
2257 | "extsprintf": "^1.2.0" | 2429 | "extsprintf": "^1.2.0" |
2258 | } | 2430 | } |
2259 | }, | 2431 | }, |
2432 | + "websocket": { | ||
2433 | + "version": "1.0.31", | ||
2434 | + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.31.tgz", | ||
2435 | + "integrity": "sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ==", | ||
2436 | + "requires": { | ||
2437 | + "debug": "^2.2.0", | ||
2438 | + "es5-ext": "^0.10.50", | ||
2439 | + "nan": "^2.14.0", | ||
2440 | + "typedarray-to-buffer": "^3.1.5", | ||
2441 | + "yaeti": "^0.0.6" | ||
2442 | + } | ||
2443 | + }, | ||
2260 | "wns": { | 2444 | "wns": { |
2261 | "version": "0.5.4", | 2445 | "version": "0.5.4", |
2262 | "resolved": "https://registry.npmjs.org/wns/-/wns-0.5.4.tgz", | 2446 | "resolved": "https://registry.npmjs.org/wns/-/wns-0.5.4.tgz", |
@@ -2292,6 +2476,16 @@ | @@ -2292,6 +2476,16 @@ | ||
2292 | "version": "1.1.0", | 2476 | "version": "1.1.0", |
2293 | "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", | 2477 | "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", |
2294 | "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==" | 2478 | "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==" |
2479 | + }, | ||
2480 | + "yaeti": { | ||
2481 | + "version": "0.0.6", | ||
2482 | + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", | ||
2483 | + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" | ||
2484 | + }, | ||
2485 | + "yaml": { | ||
2486 | + "version": "1.10.0", | ||
2487 | + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", | ||
2488 | + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" | ||
2295 | } | 2489 | } |
2296 | } | 2490 | } |
2297 | } | 2491 | } |
package.json
@@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
17 | "express": "^4.17.1", | 17 | "express": "^4.17.1", |
18 | "http": "0.0.0", | 18 | "http": "0.0.0", |
19 | "jstoxml": "^1.6.5", | 19 | "jstoxml": "^1.6.5", |
20 | + "loadtest": "^5.0.4", | ||
20 | "lodash": "^4.17.15", | 21 | "lodash": "^4.17.15", |
21 | "mongodb": "^3.5.8", | 22 | "mongodb": "^3.5.8", |
22 | "mongoose": "^5.9.18", | 23 | "mongoose": "^5.9.18", |
@@ -0,0 +1,15 @@ | @@ -0,0 +1,15 @@ | ||
1 | +module.exports.deleteCustomer = async (req, res) => { | ||
2 | + console.log('===== POST delelePrivilegeCustomer =====') | ||
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 | + console.log('body', req.body); | ||
8 | + | ||
9 | + let response = { | ||
10 | + resultCode: "20000", | ||
11 | + resultDescription: "Success" | ||
12 | + } | ||
13 | + | ||
14 | + res.status(200).send(response) | ||
15 | +} |
No preview for this file type
ssb.js
@@ -106,7 +106,7 @@ module.exports.queryCurrentPackage = async (req, res) => { | @@ -106,7 +106,7 @@ module.exports.queryCurrentPackage = async (req, res) => { | ||
106 | "promotionName": "M NBA Free Trial 1M 199Baht Monthly", | 106 | "promotionName": "M NBA Free Trial 1M 199Baht Monthly", |
107 | "packageNameEN":"xxxxxxxxx", | 107 | "packageNameEN":"xxxxxxxxx", |
108 | "packageNameTH":"xxxxxxxxx", | 108 | "packageNameTH":"xxxxxxxxx", |
109 | - "promotionCode": "7400110", | 109 | + "promotionCode": "P2007229612", |
110 | "startDate": "2018-05-31 14:23:03", | 110 | "startDate": "2018-05-31 14:23:03", |
111 | "endDate": "2018-05-31 14:23:03", | 111 | "endDate": "2018-05-31 14:23:03", |
112 | "integrationName":"INS_3G 1000B 60Days Net 4Mbps SWifi UL1", | 112 | "integrationName":"INS_3G 1000B 60Days Net 4Mbps SWifi UL1", |
@@ -151,12 +151,12 @@ module.exports.deletePackage = async (req, res) => { | @@ -151,12 +151,12 @@ module.exports.deletePackage = async (req, res) => { | ||
151 | console.log('body', req.body); | 151 | console.log('body', req.body); |
152 | 152 | ||
153 | let response = { | 153 | let response = { |
154 | - "resultCode": "50000", | ||
155 | - "developerMessage": "System error", | 154 | + "resultCode": "SSBPKG-009010202", |
155 | + "developerMessage": "TUXEDO Error", | ||
156 | "ussdMessage": "Please wait for confirmation SMS shortly.", | 156 | "ussdMessage": "Please wait for confirmation SMS shortly.", |
157 | "responseMessage": "Thank you, your package has been deleted." | 157 | "responseMessage": "Thank you, your package has been deleted." |
158 | } | 158 | } |
159 | 159 | ||
160 | 160 | ||
161 | - res.status(200).send(response) | 161 | + res.status(500).send(response) |
162 | } | 162 | } |