Commit 872fa65c31dddd2ca65158b854a300a6ff1beee3
1 parent
64e3e4b8c7
Exists in
master
combinedMessage
Showing 1 changed file with 11 additions and 1 deletions Side-by-side Diff
partner-kospinjasa.js
... | ... | @@ -402,9 +402,19 @@ function topupResponseHandler(task, response, balance, rawResponse) { |
402 | 402 | timeStamp: response.timeStamp, |
403 | 403 | resultCode: response.resultCode, |
404 | 404 | resultDesc: response.resultDesc, |
405 | - bit39: response.bit39 | |
405 | + bit39: response.bit39, | |
406 | + prevBalance: balance, | |
406 | 407 | } |
407 | 408 | |
409 | + var combinedMessage = ''; | |
410 | + | |
411 | + Object.keys(parsedResponse).forEach(function(key,index) { | |
412 | + combinedMessage += key + ': ' + parsedResponse[key] + ' ' | |
413 | + }); | |
414 | + combinedMessage = combinedMessage.trim(); | |
415 | + | |
416 | + parsedResponse.MESSAGE = combinedMessage; | |
417 | + | |
408 | 418 | logger.info('Got result: ' + message, {response: response}); |
409 | 419 | callbackReport(task.requestId, st24rc, st24message + ' -- Prev Balance: ' + balance); |
410 | 420 | pushResponseToMongoDb(task, {supplier: config.globals.gateway_name, raw: rawResponse, parsed: parsedResponse}, st24rc); |