Commit d28a39698bf99f026f62f8c4846b7fafdc940f1e
1 parent
77ce67db6e
Exists in
master
buffer jadi data
Showing 1 changed file with 1 additions and 24 deletions Side-by-side Diff
partner-datacell.js
... | ... | @@ -67,29 +67,6 @@ function topupRequest(task, retry) { |
67 | 67 | var payload_xml = createPayload(task); |
68 | 68 | console.log(payload_xml); |
69 | 69 | |
70 | - /* | |
71 | - request({uri: config.h2h_out.partner, method: 'POST'}, function(error, response, body) { | |
72 | - if (error) { | |
73 | - var error_mesasge = 'Error requesting to partner: ' + error; | |
74 | - console.log(error_message); | |
75 | - callbackReport(task['requestId'], '40', error_message); | |
76 | - return; | |
77 | - } | |
78 | - | |
79 | - if (response.statusCode != 200) { | |
80 | - var error_mesasge = 'HTTP status code = ' + response.statusCode; | |
81 | - console.log(error_message); | |
82 | - callbackReport(task['requestId'], '40', error_message); | |
83 | - return; | |
84 | - } | |
85 | - | |
86 | - console.log('Direct response from partner:'); | |
87 | - console.log(body); | |
88 | - callbackReport(task['requestId'], '68', 'cek'); | |
89 | - | |
90 | - }).end(payload_xml); | |
91 | - */ | |
92 | - | |
93 | 70 | var postRequest = { |
94 | 71 | host: "202.152.62.2", |
95 | 72 | path: "/RELOAD97.php", |
... | ... | @@ -107,7 +84,7 @@ function topupRequest(task, retry) { |
107 | 84 | console.log('Status code: ' + res.statusCode ); |
108 | 85 | var buffer = ""; |
109 | 86 | res.on( "data", function( data ) { buffer = buffer + data; } ); |
110 | - res.on( "end", function( data ) { console.log( buffer ); } ); | |
87 | + res.on( "end", function( data ) { console.log( data ); } ); | |
111 | 88 | |
112 | 89 | }); |
113 | 90 |