Commit 5c0335fe269a0cc2d518088ae642fee1ddba7264
1 parent
e86b13f39a
Exists in
master
penanganan unknown resultcode
Showing 1 changed file with 7 additions and 2 deletions Side-by-side Diff
partner-datacell.js
... | ... | @@ -126,8 +126,13 @@ function topupResponseHandler(body, request_id) { |
126 | 126 | } |
127 | 127 | |
128 | 128 | |
129 | - if (result.datacell.resultcode.length > 0 && result.datacell.resultcode[0] == '999') { | |
130 | - response_code = '40'; | |
129 | + try { | |
130 | + if (result.datacell.resultcode[0] == '999') { | |
131 | + response_code = '40'; | |
132 | + } | |
133 | + } | |
134 | + catch(err) { | |
135 | + response_code = '68'; | |
131 | 136 | } |
132 | 137 | |
133 | 138 | if (message.indexOf('Nomor tujuan salah') >= 0) { |