Permalink
Browse files

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

…etection Suite
  • Loading branch information...
1 parent 40e3de0 commit 291e7f16edfcd45ab2e67890fcccee92c0e31823 Josh Lavin committed with jonjensen Apr 29, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 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'};

0 comments on commit 291e7f1

Please sign in to comment.