Commit de78ade6c3b8a93e12ac1556e598acf746a5b5cc

Authored by Adhidarma Hadiwinoto
1 parent fef3401d20
Exists in master

unreg_same_day_dupe_on_fail_trx

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

... ... @@ -56,6 +56,19 @@ function start(options) {
56 56 createReverseHttpServer();
57 57 }
58 58  
  59 +function _unregSameDayDupeOnFailTrx(requestId, rc) {
  60 + if (!Number(config.globals.unreg_same_day_dupe_on_fail_trx)) {
  61 + return;
  62 + }
  63 +
  64 + if (rc == '68' || rc = '00') {
  65 + return;
  66 + }
  67 +
  68 + logger.verbose('Unregistering failed trx', {request_id: requestId, rc: rc});
  69 + antiSameDayDupe.unregister(requestId);
  70 +}
  71 +
59 72 function callbackReport(requestId, rc, message) {
60 73 if (rc != '68') {
61 74 resendDelay.cancel(requestId);