Commit 593ada1205d8d1a19d68deb90b371037fbec2f39
1 parent
b007a5916d
Exists in
master
penanganan system cut-off
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
partner-simplepay.js
... | ... | @@ -76,7 +76,7 @@ function _decodeResponseBody(responseBody) { |
76 | 76 | let response; |
77 | 77 | |
78 | 78 | try { |
79 | - response = JSON.parse(responseBody) | |
79 | + response = JSON.parse(responseBody); | |
80 | 80 | } |
81 | 81 | catch(e) { |
82 | 82 | logger.warn('Error parsing response body'); |
... | ... | @@ -148,7 +148,7 @@ function _responseBodyHandler(responseBody, task) { |
148 | 148 | const responseInfo = _getPropertyFromObjectSafe(response, 'info'); |
149 | 149 | |
150 | 150 | if (responseStatus == 'Error') { |
151 | - if (responseInfo == 'insufficient balance') { | |
151 | + if (['insufficient balance', 'System Cut-Off'].indexOf(responseInfo) >= 0) { | |
152 | 152 | rc = '91'; |
153 | 153 | } |
154 | 154 | callbackReport(task.requestId, '91', [responseStatus, responseInfo].join(': '), {task: task}); |