[interchange] * As of Jan 31, 2014 Authorize.Net stopped accepting a transaction ID

Mike Heins interchange-cvs at icdevgroup.org
Fri Jan 31 17:46:46 UTC 2014


commit fa1459c62982dc7bd57bb92f5f1b391ec111be2c
Author: Mike Heins <heins at icdevgroup.com>
Date:   Fri Jan 31 12:41:20 2014 -0500

    * As of Jan 31, 2014 Authorize.Net stopped accepting a transaction ID
      on transaction types that don't need it. That should be AUTH_ONLY
      and AUTH_CAPTURE, though I am waiting on a definitive pronouncement
      from them.

 lib/Vend/Payment/AuthorizeNet.pm |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/lib/Vend/Payment/AuthorizeNet.pm b/lib/Vend/Payment/AuthorizeNet.pm
index 21c728e..90a9a3d 100644
--- a/lib/Vend/Payment/AuthorizeNet.pm
+++ b/lib/Vend/Payment/AuthorizeNet.pm
@@ -505,6 +505,15 @@ sub authorizenet {
         push @query, "$key=$val";
     }
 
+	my %no_trans_id = (
+		AUTH_CAPTURE => 1,
+		AUTH_ONLY    => 1,
+	);
+
+	## As of Jan 31, 2014 AuthorizeNet errors out with x_Trans_ID on transaction type that
+	## doesn't need it
+	delete $query{x_Trans_ID} if $no_trans_id{ $query{x_Type} };
+
 #::logDebug("Authorizenet query: " . ::uneval(\%query));
     $opt->{extra_headers} = { Referer => $referer };
 



More information about the interchange-cvs mailing list