Compare View
Commits (2)
Changes
Showing 3 changed files Side-by-side Diff
lib/command-handler/buy.js
1 | -const moment = require('moment'); | |
1 | +// const moment = require('moment'); | |
2 | 2 | |
3 | 3 | const logger = require('komodo-sdk/logger'); |
4 | 4 | |
... | ... | @@ -9,9 +9,11 @@ const coreapi = require('../coreapi'); |
9 | 9 | |
10 | 10 | const coreEndpoint = '/prepaid/buy'; |
11 | 11 | |
12 | +/* | |
12 | 13 | function generateRequestId(product, destination) { |
13 | 14 | return `AUTO_${ product.toUpperCase() }_${ destination }_${ moment().format('YYYYMMDD') }`; |
14 | 15 | } |
16 | +*/ | |
15 | 17 | |
16 | 18 | function help() { |
17 | 19 | return `Untuk pembelian, ketik perintah dengan format: <KODEPRODUK>.<NOMORTUJUAN>.<PIN>`; |
... | ... | @@ -42,7 +44,8 @@ function execute(tokens, params, cb) { |
42 | 44 | product_name: (tokens[1] || '').trim().toUpperCase(), |
43 | 45 | destination, |
44 | 46 | password: tokens[3], |
45 | - request_id: `${generateRequestId(tokens[1], destination)}${Number(tokens[4]) ? '_req' + Number(tokens[4]) : ''}`, | |
47 | + // request_id: `${generateRequestId(tokens[1], destination)}${Number(tokens[4]) ? '_req' + Number(tokens[4]) : ''}`, | |
48 | + request_id_suffix: tokens[4] || '', | |
46 | 49 | postpaid: 0 |
47 | 50 | }; |
48 | 51 |
package-lock.json