Commit 0606b9c1356080e0e8a77c585aba9b263ceb2070
1 parent
522cfb9eed
Exists in
master
config.sdk_trx_id_adder aware
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
index.js
... | ... | @@ -76,6 +76,7 @@ async function getTask() { |
76 | 76 | if (!task) return null; |
77 | 77 | |
78 | 78 | task.remote_product = ((config.remote_products || {})[task.product]) || task.product; |
79 | + task.trx_id = Number(task.trx_id) + (config.sdk_trx_id_adder || 0); | |
79 | 80 | |
80 | 81 | logger.verbose('POSTPAID2-SDK: Got task from CORE on pulling task', { task }); |
81 | 82 | |
... | ... | @@ -121,7 +122,7 @@ exports.report = async (data, xid, retry) => { |
121 | 122 | const dataToReport = { |
122 | 123 | handler: config.handler || config.handler_name, |
123 | 124 | command: data.command, |
124 | - trx_id: data.trx_id, | |
125 | + trx_id: Number(data.trx_id) - (config.sdk_trx_id_adder || 0), | |
125 | 126 | rc: data.rc, |
126 | 127 | sn: data.sn, |
127 | 128 | amount: data.amount, |