Commit e3c1fb0ae5321fe528e1d284c5cd27cd0a6cb34a

Authored by Adhidarma Hadiwinoto
1 parent 439dd26b41
Exists in master

perbaikan sn

Showing 2 changed files with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -196,13 +196,13 @@ function callbackReport(requestId, responseCode, msg, rawResponse, dontResendDel
196 196 }
197 197 });
198 198 }
199   -
  199 +
200 200 _callbackReport(requestId, responseCode, msg, null, rawResponse);
201 201 }
202 202  
203 203 function getSnFromMessage(msg) {
204 204 try {
205   - var matches = msg.match(/SN:(\w+)/);
  205 + var matches = msg.match(/SN:\s*(\d+)/);
206 206 return matches[1];
207 207 }
208 208 catch(e) {
... ... @@ -4,9 +4,9 @@ var crypto = require('crypto');
4 4 describe('#partner', function () {
5 5 var partner = require('./partner-fm')
6 6  
7   - describe('#composeTopupStatusMessage', function() {
  7 + describe('#composeTopupMessage', function() {
8 8 it('should return correct xml message', function() {
9   - var msg = partner.composeTopupStatusMessage('1234', 'S10', '08120812', '2345');
  9 + var msg = partner.composeTopupMessage('1234', 'S10', '08120812', '2345');
10 10 crypto.createHash('sha256').update(msg, 'utf8').digest().toString('hex').should.equal('1b926cb9101d9b172ae12206d0c10d4800b553f3d9f2e320fe526c7effb11985');
11 11 })
12 12 });