[interchange/gateway_log: 7/11] Fix glitch on result_code map test.
Mark Johnson <[email protected]> Sat, 04 Nov 2017 18:05:44 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit a7e6ba4d37c27308ef56d7acaaa7e9cefd959c7f Author: Mark Johnson <[email protected]> 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);