Commit 6b254f12fa001c0e113aa6962a31007c1b5ec492
1 parent
49aa80909f
Exists in
master
ubah flow
Showing 1 changed file with 11 additions and 12 deletions Side-by-side Diff
httppulsakita.js
... | ... | @@ -104,6 +104,17 @@ function topupRequest(task, retry) { |
104 | 104 | console.log(result); |
105 | 105 | |
106 | 106 | var response_code = result.respon.rc[0].replace(/^00/, ''); |
107 | + if (response_code == '54' || response_code == '68') { | |
108 | + if (retry) { | |
109 | + setTimeout(function() { | |
110 | + topupRequest(task, retry - 1); | |
111 | + }, 60000); | |
112 | + | |
113 | + } else { | |
114 | + callbackReport(task['requestId'], '68', message); | |
115 | + } | |
116 | + return; | |
117 | + } | |
107 | 118 | |
108 | 119 | var token = ''; |
109 | 120 | if (result.respon.token) { |
... | ... | @@ -117,18 +128,6 @@ function topupRequest(task, retry) { |
117 | 128 | |
118 | 129 | var message = result.respon.pesan[0].replace(/\n/g, ' '); |
119 | 130 | |
120 | - if (response_code == '54' || response_code == '68') { | |
121 | - if (retry) { | |
122 | - setTimeout(function() { | |
123 | - topupRequest(task, retry - 1); | |
124 | - }, 60000); | |
125 | - | |
126 | - } else { | |
127 | - callbackReport(task['requestId'], '68', message); | |
128 | - } | |
129 | - return; | |
130 | - } | |
131 | - | |
132 | 131 | |
133 | 132 | if (response_code == '00') { |
134 | 133 |