[interchange/gateway_log] PaypalExpress gateway logging bugfixes
Mark Johnson <[email protected]> Sun, 05 Nov 2017 22:32:04 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 8955fcb9b33020e25c7d14caaf136f12c07068db Author: Mark Johnson <[email protected]> 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',