[interchange] PaypalExpress gateway logging bugfixes

David Christensen interchange-cvs at icdevgroup.org
Mon Nov 6 14:57:35 UTC 2017


commit 66f8ba5a538c2f6c134cbb3705c5e5cb055ac878
Author: Mark Johnson <mark at endpoint.com>
Date:   Sun Nov 5 17:30:13 2017 -0500

    PaypalExpress gateway logging bugfixes
    
    * Syntax error
    
    * Structure of response may change on certain errors, causing deep
      hash references to produce a strict error.

 lib/Vend/Payment/PaypalExpress.pm |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Payment/PaypalExpress.pm b/lib/Vend/Payment/PaypalExpress.pm
index d4c5c24..10f1f47 100644
--- a/lib/Vend/Payment/PaypalExpress.pm
+++ b/lib/Vend/Payment/PaypalExpress.pm
@@ -2046,7 +2046,7 @@ use Vend::Payment::GatewayLog;
 use base qw/Vend::Payment::GatewayLog/;
 
 sub log_it {
-	my $self = shift
+	my $self = shift;
 
     my $request = $self->request;
     unless ($request) {
@@ -2095,6 +2095,10 @@ sub log_it {
     $rc = -1
         unless length ($rc) && $rc =~ /\d/;
 
+    # Don't want unexpected response structures from different errors
+    # to blow up the error log
+    no strict 'refs';
+
     my %fields = (
         trans_type => $response->{DoExpressCheckoutPaymentResponseDetails}{PaymentInfo}{TransactionType} || 'x',
         processor => 'paypalexpress',



More information about the interchange-cvs mailing list