Commit 5e9772acf2bf572003498c1e3ad9f67d79d3c358
1 parent
465d002383
Exists in
master
penanganan error status
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
partner-simplepay.js
... | ... | @@ -147,8 +147,11 @@ function _responseBodyHandler(responseBody, task) { |
147 | 147 | const responseStatus = _getPropertyFromObjectSafe(response, status); |
148 | 148 | const responseInfo = _getPropertyFromObjectSafe(response, info); |
149 | 149 | |
150 | - if (responseStatus == 'Error' && responseInfo == 'insufficient balance') { | |
151 | - callbackReport(task.requestId, '91', responseInfo, {task: task}); | |
150 | + if (responseStatis == 'Error') { | |
151 | + if (responseInfo == 'insufficient balance') { | |
152 | + rc = '91'; | |
153 | + } | |
154 | + callbackReport(task.requestId, '91', [responeStatus, responseInfo].join(': '), {task: task}); | |
152 | 155 | return; |
153 | 156 | } |
154 | 157 |