Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: cvs
[interchange] Fix [charge] to not populate $Vend::Session->{errors}{mv_credit_card_valid}
 

Index | Next | Previous | View Flat


interchange-cvs at icdevgroup

Apr 14, 2011, 10:14 AM


Views: 425
Permalink
[interchange] Fix [charge] to not populate $Vend::Session->{errors}{mv_credit_card_valid}

commit 5c6a0418fc94841d2efa9aec9db25a3874fe774c
Author: Stefan Hornburg (Racke) <racke [at] linuxia>
Date: Thu Apr 14 19:10:27 2011 +0200

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.

lib/Vend/Payment.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Payment.pm b/lib/Vend/Payment.pm
index d0a6238..8175da2 100644
--- a/lib/Vend/Payment.pm
+++ b/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'};
}

_______________________________________________
interchange-cvs mailing list
interchange-cvs [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs

Subject User Time
[interchange] Fix [charge] to not populate $Vend::Session->{errors}{mv_credit_card_valid} interchange-cvs at icdevgroup Apr 14, 2011, 10:14 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.