Commit b0180091c08b0be24eb5409b7e6e79143ba8ff09

Authored by Adhidarma Hadiwinoto
1 parent 4daf69632d
Exists in master

update balance

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

... ... @@ -114,6 +114,10 @@ function _hitTopup(task, isCheckStatus) {
114 114 logger.verbose('Response body parsed as json value', {responseData: responseData});
115 115 const data = responseDataProcessor(responseData);
116 116  
  117 + if (data.balance && aaa.updateBalance) {
  118 + aaa.updateBalance(data.balance);
  119 + }
  120 +
117 121 callbackReport(task.requestId, data.rc, data.combinedMessage, {task: task});
118 122 })
119 123  
... ... @@ -206,6 +210,7 @@ function responseDataProcessor(responseData) {
206 210 combinedMessage.push('amount: ' + retval.amount);
207 211  
208 212 retval.balance = responseData.saldo || 0;
  213 + retval.saldo = retval.balance;
209 214 combinedMessage.push('balance: ' + retval.balance);
210 215  
211 216 retval.ts = responseData.waktu || '';