From 5f5702f45e43801ca6efb66b9368f8b53040e488 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <adhisimon@gmail.com>
Date: Wed, 16 Feb 2022 23:18:52 +0700
Subject: [PATCH] Perbaikan default rc

---
 lib/parse-result.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/parse-result.js b/lib/parse-result.js
index 8c5da9e..0f5111b 100644
--- a/lib/parse-result.js
+++ b/lib/parse-result.js
@@ -86,7 +86,9 @@ module.exports = (xid, trxIdFromCaller, xml, isCallback, remoteIp) => {
         return;
     }
 
-    const rc = translateRc(xid, responseCodeFromResponse) || '68';
+    const rc = responseCodeFromResponse
+        ? translateRc(xid, responseCodeFromResponse) || '40'
+        : '68';
 
     const sn = (
         rc === '00' && (
-- 
1.9.0