From d5a1a4122fc4f93de2821cacc3a961f3a29d6ac9 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 9 Jul 2014 13:19:16 -0700 Subject: [PATCH] Parse nun-numeric AUTHORIZATIONRESULT values properly, patch from Doug Juhlin / Donor.com, thanks! RT#26568 --- Changes | 5 +++-- lib/Business/OnlinePayment/IATSPayments.pm | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 52bb9c2..d155fbd 100644 --- a/Changes +++ b/Changes @@ -2,8 +2,9 @@ Revision history for Perl extension Business::OnlinePayment::IATSPayments. 0.03 unreleased - - Correct default_ns for non-USD/CAD transactions, patch from Doug - Juhlin / Donor.com, thanks! + - Patches from Dough Juhlin / Donor.com, thanks! + * Correct default_ns for non-USD/CAD transactions + * Parse nun-numeric AUTHORIZATIONRESULT values properly 0.02 Sat Feb 15 12:45:24 PST 2014 - trim spaces from authorization (TRANSACTIONID) diff --git a/lib/Business/OnlinePayment/IATSPayments.pm b/lib/Business/OnlinePayment/IATSPayments.pm index 8bc3d78..df0a717 100644 --- a/lib/Business/OnlinePayment/IATSPayments.pm +++ b/lib/Business/OnlinePayment/IATSPayments.pm @@ -296,9 +296,9 @@ sub submit { } $self->authorization($processresult->{TRANSACTIONID} || ''); - if ( $processresult->{AUTHORIZATIONRESULT} =~ /^\s*OK(:\s*\d+:)?(\w)?\s*$/i ) { + if ( $processresult->{AUTHORIZATIONRESULT} =~ /^\s*OK(:\s*\w+:)?(\w)?\s*$/i ) { $self->is_success(1); - $self->avs_code($2); #avs_code? sure looks like one + $self->avs_code($2); } elsif ( $processresult->{AUTHORIZATIONRESULT} =~ /^\s*Timeout\s*$/i ) { $self->is_success(0); -- 2.11.0