Commit f447cb3581cb36ab88be525470baa0fc812267eb

Authored by Adhidarma Hadiwinoto
1 parent 8a9584dcb3
Exists in master

hapus garbage dari sn

Showing 1 changed file with 10 additions and 0 deletions Side-by-side Diff

... ... @@ -170,9 +170,11 @@ function topupRequestXMLRPC(task, retry) {
170 170  
171 171 var responseTs = strftime('%Y-%m-%d %H:%M:%S', new Date());
172 172  
  173 + /*
173 174 if (value['RESPONSECODE'] == '00' && config.h2h_out.parse_sn == 'YES') {
174 175 value['MESSAGE'] = 'SN=' + parseSN(value['MESSAGE']) + '; ' + value['MESSAGE'];
175 176 }
  177 + */
176 178  
177 179 if (value['RESPONSECODE'] != '00' && value['RESPONSECODE'] != '68') {
178 180  
... ... @@ -185,6 +187,14 @@ function topupRequestXMLRPC(task, retry) {
185 187  
186 188 }
187 189  
  190 + if (value['RESPONSECODE'] != '00') {
  191 + try {
  192 + value['MESSAGE'] = value['MESSAGE'].replace(/\.;/, ';');
  193 + }
  194 + catch(errReplaceDot) { }
  195 +
  196 + }
  197 +
188 198 pushResponseToMongoDb(task, {ts: responseTs, supplier: config.globals.gateway_name, raw: JSON.stringify(value), parsed: value}, value['RESPONSECODE']);
189 199  
190 200 callbackReport(value['REQUESTID'], value['RESPONSECODE'], value['MESSAGE']);