[interchange-cvs] [SCM] Interchange branch, master, updated. 6f7164b678b57a507dea68c2f7733ebbfa428f12

Jon Jensen interchange-cvs at icdevgroup.org
Thu May 28 18:42:57 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange".

The branch, master has been updated
       via  6f7164b678b57a507dea68c2f7733ebbfa428f12 (commit)
      from  d7488b1affb05f765cf270cc1b1b380984156710 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6f7164b678b57a507dea68c2f7733ebbfa428f12
Author: Mark Lipscombe <markl at gasupnow.com>
Date:   Wed May 27 15:38:42 2009 -0700

    Send correct level 2 card data with AuthorizeNet module
    
    This improves the discount rate for a lot of card types.

-----------------------------------------------------------------------

Summary of changes and diff:
 lib/Vend/Payment/AuthorizeNet.pm |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/lib/Vend/Payment/AuthorizeNet.pm b/lib/Vend/Payment/AuthorizeNet.pm
index 745cc62..573628f 100644
--- a/lib/Vend/Payment/AuthorizeNet.pm
+++ b/lib/Vend/Payment/AuthorizeNet.pm
@@ -3,9 +3,7 @@
 # Connection routine for AuthorizeNet version 3 using the 'ADC Direct Response'
 # method.
 #
-# $Id: AuthorizeNet.pm,v 2.21 2009-03-16 19:34:00 jon Exp $
-#
-# Copyright (C) 2003-2007 Interchange Development Group, http://www.icdevgroup.org/
+# Copyright (C) 2003-2009 Interchange Development Group, http://www.icdevgroup.org/
 # Copyright (C) 1999-2002 Red Hat, Inc.
 #
 # Authors:
@@ -274,7 +272,9 @@ sub authorizenet {
 
 	my $opt;
 	my $secret;
-	
+	my $shipping;
+	my $salestax;
+
 	if(ref $user) {
 		$opt = $user;
 		$user = $opt->{id} || undef;
@@ -398,6 +398,20 @@ sub authorizenet {
         $amount = Vend::Util::round_to_frac_digits($amount,$precision);
     }
 
+	$shipping = $opt->{shipping} if $opt->{shipping};
+
+	if(! $shipping) {
+		$shipping = Vend::Interpolate::tag_shipping();
+		$shipping = Vend::Util::round_to_frac_digits($shipping,$precision);
+	}
+
+	$salestax = $opt->{salestax} if $opt->{salestax};
+
+	if(! $salestax) {
+		$salestax = Vend::Interpolate::salestax();
+		$salestax = Vend::Util::round_to_frac_digits($salestax,$precision);
+	}
+
 	my $order_id = gen_order_id($opt);
 
 #::logDebug("auth_code=$actual->{auth_code} order_id=$opt->{order_id}");
@@ -414,6 +428,8 @@ sub authorizenet {
 		x_Method => 'ECHECK',
 	);
 
+	my $tax_exempt = ($salestax > 0) ? 'FALSE' : 'TRUE';
+
     my %query = (
 		x_Test_Request			=> $opt->{test} || charge_param('test'),
 		x_First_Name			=> $actual->{b_fname},
@@ -436,6 +452,10 @@ sub authorizenet {
 		x_Phone					=> $actual->{phone_day},
 		x_Type					=> $transtype,
 		x_Amount				=> $amount,
+		x_Tax					=> $salestax,
+		x_Freight				=> $shipping,
+		x_PO_Num				=> $actual->{po_number},
+		x_Tax_Exempt			=> $tax_exempt,
 		x_Method				=> 'CC',
 		x_Card_Num				=> $actual->{mv_credit_card_number},
 		x_Exp_Date				=> $exp,


hooks/post-receive
-- 
Interchange



More information about the interchange-cvs mailing list