Commit c52616d961f32f1580fd14f2901abaaba0e2c0dc
1 parent
af3eb2c3bc
Exists in
master
password
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
partner-cjk.js
... | ... | @@ -31,7 +31,8 @@ function start(_config, _callbackReport, options) { |
31 | 31 | } |
32 | 32 | |
33 | 33 | function calculateSignature(params) { |
34 | - var plain = params.trxtype + params.prdcode + params.value + params.msisdn + params.trxid + params.uid; | |
34 | + var passwordHash = crypto.createHash('sha1').update(params.password).digest().toString('hex'); | |
35 | + var plain = params.trxtype + params.prdcode + params.value + params.msisdn + params.trxid + params.uid + passwordHash; | |
35 | 36 | var signature = crypto.createHash('sha256').update(plain).digest().toString('hex'); |
36 | 37 | |
37 | 38 | try { |
... | ... | @@ -84,6 +85,7 @@ function topupRequest(task, retry) { |
84 | 85 | msisdn: task.destination, |
85 | 86 | trxid: task.requestId, |
86 | 87 | uid: config.h2h_out.userid, |
88 | + password: config.h2h_out.password, | |
87 | 89 | }; |
88 | 90 | |
89 | 91 | var postBody = createXmlPayload(params); |