From: Ivan Kohler Date: Wed, 9 Jul 2014 20:19:16 +0000 (-0700) Subject: Parse nun-numeric AUTHORIZATIONRESULT values properly, patch from Doug Juhlin / Donor... X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=d5a1a4122fc4f93de2821cacc3a961f3a29d6ac9;p=Business-OnlinePayment-IATSPayments.git Parse nun-numeric AUTHORIZATIONRESULT values properly, patch from Doug Juhlin / Donor.com, thanks! RT#26568 --- 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);