[interchange/gateway_log: 7/11] Fix glitch on result_code map test.

Mark Johnson interchange-cvs at icdevgroup.org
Sat Nov 4 18:05:44 UTC 2017


commit a7e6ba4d37c27308ef56d7acaaa7e9cefd959c7f
Author: Mark Johnson <mark at endpoint.com>
Date:   Sat Jan 9 15:16:52 2010 -0500

    Fix glitch on result_code map test.
    
    0 is a valid and expected response. Change test from perly true
    to length.

 lib/Vend/Payment/CyberSource.pm |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/lib/Vend/Payment/CyberSource.pm b/lib/Vend/Payment/CyberSource.pm
index 0927915..5c75c0a 100644
--- a/lib/Vend/Payment/CyberSource.pm
+++ b/lib/Vend/Payment/CyberSource.pm
@@ -1997,11 +1997,12 @@ sub cybersource {
         ? $resp{pp_redirect}
         : $resp{requestID}
     ;
-    $resp{PNREF}      = $resp{requestID};
-    $resp{transtype}  = $inv_trans_map{$transtype} || $transtype;
-    $resp{acct_type}  = $acct_type;
-    $resp{rc_msg}     = $reason_code_map{ $resp{reasonCode} } || 'Unknown';
-    $resp{result_code} = $reason_result_map{ $resp{reasonCode} } || -2;
+    $resp{PNREF}       = $resp{requestID};
+    $resp{transtype}   = $inv_trans_map{$transtype} || $transtype;
+    $resp{acct_type}   = $acct_type;
+    $resp{rc_msg}      = $reason_code_map{ $resp{reasonCode} } || 'Unknown';
+    $resp{result_code} = $reason_result_map{ $resp{reasonCode} };
+    $resp{result_code} = -2 unless length ($resp{result_code});
 
     $gwl->response(\%resp);
 



More information about the interchange-cvs mailing list