Commit 3ce76ddb98cf1964e966668722ee563435f1689e

Authored by Adhidarma Hadiwinoto
1 parent f86e547fd8
Exists in master

kembali jadi charge

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

... ... @@ -38,7 +38,7 @@ function createPayload(task) {
38 38  
39 39 var payload = {
40 40 datacell: [
41   - { perintah: 'CHARGE'},
  41 + {perintah: 'charge'},
42 42 {oprcode: task['remoteProduct']},
43 43 {userid: config.h2h_out.userid},
44 44 {time: timestamp},
... ... @@ -96,6 +96,14 @@ function topupRequest(task, retry) {
96 96 function topupResponseHandler(body, request_id) {
97 97 logger.info('topupResponseHandler', {body: body, request_id: request_id});
98 98  
  99 + if (!body) {
  100 + logger.info('Partner send empty response', {request_id: request_id});
  101 + if (request_id) {
  102 + callbackReport(request_id, '68', 'partner send empty response');
  103 + }
  104 + return;
  105 + }
  106 +
99 107 xml2js(body, function (err, result) {
100 108 if (err) {
101 109 logger.warn('topupResponseHandler', {body: body});