Commit f987dc6b6baa9479d9dbd32d2b4cc09351b3645a
1 parent
4334f5ca88
Exists in
master
perbaikan sn
Showing 1 changed file with 2 additions and 9 deletions Side-by-side Diff
partner-masterpulsa-voucher.js
... | ... | @@ -138,7 +138,7 @@ function parsePaymentResponse(message) { |
138 | 138 | retval.sn = data[9]; |
139 | 139 | } |
140 | 140 | catch(err) { |
141 | - retval.sn = retval.refnum; | |
141 | + retval.sn = rehashRefnum(retval.refnum); | |
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
... | ... | @@ -162,14 +162,7 @@ function rehashRefnum(refnum) { |
162 | 162 | } |
163 | 163 | |
164 | 164 | function reportPaymentSuccess(task, response) { |
165 | - var sn = ''; | |
166 | - if (response.sn) { | |
167 | - sn = response.sn; | |
168 | - } else { | |
169 | - sn = rehashRefnum(response.refnum); | |
170 | - } | |
171 | - | |
172 | - var message = 'SN=' + sn + '; ' + response.raw; | |
165 | + var message = 'SN=' + response.sn + '; ' + response.raw; | |
173 | 166 | |
174 | 167 | logger.info('Report payment success to ST24', {task: task, response: response}); |
175 | 168 |