Commit 064e7c879a602e8df46d311804ab8f973ebfa7e0

Authored by Adhidarma Hadiwinoto
1 parent 6108ae8041
Exists in master

include sn di pushResponse

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

partner-kospinjasa.js
... ... @@ -262,6 +262,8 @@ function topupResponseHandler(task, response, balance, rawResponse) {
262 262 var resultCode = parseInt(response.outputParameter.resultCode.$value);
263 263 var bit39 = parseInt(response.outputParameter.bit39.$value);
264 264  
  265 + var sn = '';
  266 +
265 267 if ( resultCode == 1 ) {
266 268 // product disabled
267 269 st24rc = '13';
... ... @@ -364,8 +366,6 @@ function topupResponseHandler(task, response, balance, rawResponse) {
364 366 }
365 367 else if ( resultCode == 0 && bit39 == 0) {
366 368  
367   - var sn = '';
368   -
369 369 try {
370 370 sn = response.outputParameter.bit61.$value.substring(43);
371 371 }
... ... @@ -402,12 +402,14 @@ function topupResponseHandler(task, response, balance, rawResponse) {
402 402 resultDesc: response.outputParameter.resultDesc.$value,
403 403 bit39: response.outputParameter.bit39.$value,
404 404 prevBalance: balance,
  405 + sn: sn,
  406 + st24message: st24message,
405 407 }
406 408  
407 409 var combinedMessage = '';
408 410  
409 411 Object.keys(parsedResponse).forEach(function(key,index) {
410   - combinedMessage += key + ': ' + parsedResponse[key] + ' '
  412 + combinedMessage += key + ': ' + parsedResponse[key] + '; '
411 413 });
412 414 combinedMessage = combinedMessage.trim();
413 415