[interchange] Option to allow Authorize.net's "hold for review" orders, via Fraud Detection Suite

Jon Jensen <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit 291e7f16edfcd45ab2e67890fcccee92c0e31823
Author: Josh Lavin <[email protected]>
Date:   Fri Apr 29 15:07:16 2011 -0500

    Option to allow Authorize.net's "hold for review" orders, via Fraud Detection Suite

 lib/Vend/Payment/AuthorizeNet.pm |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Payment/AuthorizeNet.pm b/lib/Vend/Payment/AuthorizeNet.pm
index 8718c84..21c728e 100644
--- a/lib/Vend/Payment/AuthorizeNet.pm
+++ b/lib/Vend/Payment/AuthorizeNet.pm
@@ -3,7 +3,7 @@
 # Connection routine for AuthorizeNet version 3 using the 'ADC Direct Response'
 # method.
 #
-# Copyright (C) 2003-2009 Interchange Development Group, http://www.icdevgroup.org/
+# Copyright (C) 2003-2011 Interchange Development Group, http://www.icdevgroup.org/
 # Copyright (C) 1999-2002 Red Hat, Inc.
 #
 # Authors:
@@ -304,6 +304,10 @@ sub authorizenet {
 	
 	$secret    =  charge_param('secret') if ! $secret;
 
+    if (! defined $opt->{accept_for_review}) {
+         $opt->{accept_for_review} = charge_param('accept_for_review');
+    }
+
     $opt->{host}   ||= 'secure.authorize.net';
 
     $opt->{script} ||= '/gateway/transact.dll';
@@ -582,6 +586,10 @@ sub authorizenet {
     	$result{MStatus} = 'success';
 		$result{'order-id'} ||= $opt->{order_id};
     }
+    elsif ($opt->{accept_for_review} && $result{x_response_code} == 4) {
+        $result{MStatus} = 'success';
+        $result{'order-id'} ||= $opt->{order_id};
+    }
 	else {
     	$result{MStatus} = 'failure';
 		delete $result{'order-id'};
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.