Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PaypalExpress gateway logging bugfixes
* Syntax error

* Structure of response may change on certain errors, causing deep
  hash references to produce a strict error.
  • Loading branch information
msjohns1 authored and David Christensen committed Nov 6, 2017
1 parent e653676 commit 66f8ba5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Vend/Payment/PaypalExpress.pm
Expand Up @@ -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) {
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 66f8ba5

Please sign in to comment.