Skip to content

Commit

Permalink
Fix glitch on result_code map test.
Browse files Browse the repository at this point in the history
0 is a valid and expected response. Change test from perly true
to length.
  • Loading branch information
msjohns1 committed Nov 4, 2017
1 parent e909f77 commit a7e6ba4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/Vend/Payment/CyberSource.pm
Expand Up @@ -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);

Expand Down

0 comments on commit a7e6ba4

Please sign in to comment.