Commit a433d0ba572514381cf2b69b50901b8c52c3f812
1 parent
52fa01ba17
Exists in
master
typo fix
Showing 2 changed files with 11 additions and 1 deletions Side-by-side Diff
partner-misc.js
... | ... | @@ -111,6 +111,15 @@ function processPartnerResponseBody(body, task) { |
111 | 111 | messages.push(responseMessage); |
112 | 112 | } |
113 | 113 | |
114 | + let responseAmount; | |
115 | + if (response.data && response.data.info && response.data.info.amount) { | |
116 | + responseAmount = response.data.info.amount; | |
117 | + | |
118 | + if (responseAmount) { | |
119 | + messages.push('Amount: ' + responseAmount); | |
120 | + } | |
121 | + } | |
122 | + | |
114 | 123 | let responseBalance; |
115 | 124 | if (response.data && response.data.balance) { |
116 | 125 | responseBalance = response.data.balance; |
... | ... | @@ -128,6 +137,7 @@ function processPartnerResponseBody(body, task) { |
128 | 137 | message: messages.join('. ') + '.', |
129 | 138 | sn: '', |
130 | 139 | handler: config.handler_name, |
140 | + amount: responseAmount, | |
131 | 141 | balance: responseBalance, |
132 | 142 | core_task: task, |
133 | 143 | raw: body |
partner.js
... | ... | @@ -60,7 +60,7 @@ function _requestToPartner(task, pendingOnError) { |
60 | 60 | _reportToCore({ |
61 | 61 | trx_id: task.trx_id, |
62 | 62 | rc: rc, |
63 | - message: 'Partner returning HTTP STATUS CODE ' + res.statusCode + ' instead of 200'; | |
63 | + message: 'Partner returning HTTP STATUS CODE ' + res.statusCode + ' instead of 200', | |
64 | 64 | handler: config.handler_name |
65 | 65 | }) |
66 | 66 |