Commit 1ffca70467adc35d31e13315d4f3a7111f4fa798

Authored by Adhidarma Hadiwinoto
1 parent 981aeec500
Exists in master

penanganan salah prefix

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

... ... @@ -94,9 +94,14 @@ function directResponseHandler(body, request_id) {
94 94  
95 95 var request_id = result.pulsamatic.partner_trxid[0].trim();
96 96 var message = result.pulsamatic.message[0].trim();
  97 + var status = result.pulsamatic.result[0].trim();
97 98  
98   - if (result.pulsamatic.result[0].trim() == 'failed') {
  99 + if (status === 'failed') {
99 100 response_code = '40';
  101 +
  102 + if (message.indexOf('Jenis produk tidak cocok') >= 0) {
  103 + response_code = '14';
  104 + }
100 105 }
101 106  
102 107 callbackReport(request_id, response_code, message);