Parse nun-numeric AUTHORIZATIONRESULT values properly, patch from Doug Juhlin / Donor...
authorIvan Kohler <ivan@freeside.biz>
Wed, 9 Jul 2014 20:19:16 +0000 (13:19 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 9 Jul 2014 20:19:16 +0000 (13:19 -0700)
Changes
lib/Business/OnlinePayment/IATSPayments.pm

diff --git a/Changes b/Changes
index 52bb9c2..d155fbd 100644 (file)
--- 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)
index 8bc3d78..df0a717 100644 (file)
@@ -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);