Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix [charge] to not populate $Vend::Session->{errors}{mv_credit_card_…

…valid}

when payment module returned an empty error message.

This happens with PayPaypalExpress when using setrequest request and
results in [if errors]...[/if] being true but [error all=1 show_error=1]
displaying nothing.
  • Loading branch information...
commit 5c6a0418fc94841d2efa9aec9db25a3874fe774c 1 parent 60a4731
@racke racke authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Vend/Payment.pm
View
4 lib/Vend/Payment.pm
@@ -508,7 +508,9 @@ sub charge {
if($result{$svar} !~ /^success/) {
$Vend::Session->{payment_error} = $result{$evar};
- $Vend::Session->{errors}{mv_credit_card_valid} = $result{$evar};
+ if ($result{$evar} =~ /\S/) {
+ $Vend::Session->{errors}{mv_credit_card_valid} = $result{$evar};
+ }
$result{'invalid-order-id'} = delete $result{'order-id'}
if $result{'order-id'};
}
Please sign in to comment.
Something went wrong with that request. Please try again.