From: ivan Date: Sun, 15 Nov 2009 02:39:00 +0000 (+0000) Subject: - Patch from Michael Peters to fix a bug in email address handling: X-Git-Tag: README~3 X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment-AuthorizeNet.git;a=commitdiff_plain;h=92b8ff65410aa005ef662179d123dadf0fd3a155 - Patch from Michael Peters to fix a bug in email address handling: exclude x_Email_Customer flag when it is not specified in content, to avoid overriding admin settings. --- diff --git a/AuthorizeNet.pm b/AuthorizeNet.pm index 3ff2a46..70410d6 100644 --- a/AuthorizeNet.pm +++ b/AuthorizeNet.pm @@ -6,7 +6,7 @@ use Business::OnlinePayment; use vars qw($VERSION @ISA $me); @ISA = qw(Business::OnlinePayment); -$VERSION = '3.21_01'; +$VERSION = '3.21'; $me = 'Business::OnlinePayment::AuthorizeNet'; sub set_defaults { @@ -132,7 +132,7 @@ Business::OnlinePayment::AuthorizeNet - AuthorizeNet backend for Business::Onlin type => 'CC', action => 'Post Authorization', login => 'YOURLOGIN - password => 'YOURPASSWORD', + password => 'YOURPASSWORD', #or transaction key order_number => $ordernum, amount => '49.95', ); @@ -157,7 +157,7 @@ Business::OnlinePayment::AuthorizeNet - AuthorizeNet backend for Business::Onlin $tx->content( type => 'CC', login => 'testdrive', - password => 'testpass', + password => 'testpass', #or transaction key action => 'Recurring Authorization', interval => '7 days', start => '2008-3-10', @@ -195,7 +195,7 @@ Business::OnlinePayment::AuthorizeNet - AuthorizeNet backend for Business::Onlin type => 'CC', subscription => '99W2C', login => 'testdrive', - password => 'testpass', + password => 'testpass', #or transaction key action => 'Modify Recurring Authorization', interval => '7 days', start => '2008-3-10', @@ -225,7 +225,7 @@ Business::OnlinePayment::AuthorizeNet - AuthorizeNet backend for Business::Onlin $tx->content( subscription => '99W2D', login => 'testdrive', - password => 'testpass', + password => 'testpass', # or transaction key action => 'Cancel Recurring Authorization', ); $tx->submit(); @@ -245,11 +245,11 @@ Business::OnlinePayment::AuthorizeNet - AuthorizeNet backend for Business::Onlin =head2 CC, Visa, MasterCard, American Express, Discover -Content required: type, login, password|transaction_key, action, amount, first_name, last_name, card_number, expiration. +Content required: type, login, password, action, amount, first_name, last_name, card_number, expiration. =head2 Check -Content required: type, login, password|transaction_key, action, amount, first_name, last_name, account_number, routing_code, bank_name (non-subscription), account_type (subscription), check_type (subscription). +Content required: type, login, password, action, amount, first_name, last_name, account_number, routing_code, bank_name (non-subscription), account_type (subscription), check_type (subscription). =head2 Subscriptions @@ -357,7 +357,9 @@ from content(%content): zip => 'ship_zip', country => 'ship_country', -=head1 NOTE +=head1 NOTES + +Use your transaction key in the password field. Unlike Business::OnlinePayment or pre-3.0 verisons of Business::OnlinePayment::AuthorizeNet, 3.1 requires separate first_name and @@ -365,8 +367,8 @@ last_name fields. Business::OnlinePayment::AuthorizeNet uses Authorize.Net's "Advanced Integration Method (AIM) (formerly known as ADC direct response)" and -"Automatic Recurring Billing (ARB)", sending a username and transaction_key -or password with every transaction. Therefore, Authorize.Net's +"Automatic Recurring Billing (ARB)", sending a username and password (or +transaction_key) with every transaction. Therefore, Authorize.Net's referrer "security" is not necessary. In your Authorize.Net interface at https://secure.authorize.net/ make sure the list of allowable referers is blank. Alternatively, set the B field in the transaction content. @@ -438,6 +440,8 @@ Paul Timmins added the check_number field. Nate Nuss implemented the ("Additional Shipping Information (Level 2 Data)" fields: tax, freight, duty, tax_exempt, po_number. +Michael Peters fixed a bug in email address handling. + =head1 CONTRIBUTIONS AND REPOSITORY Please send patches as unified diffs (diff -u) to (in order of preference): diff --git a/AuthorizeNet/AIM.pm b/AuthorizeNet/AIM.pm index 36296f0..5324e51 100644 --- a/AuthorizeNet/AIM.pm +++ b/AuthorizeNet/AIM.pm @@ -12,7 +12,7 @@ require Exporter; @ISA = qw(Exporter Business::OnlinePayment::AuthorizeNet); @EXPORT = qw(); @EXPORT_OK = qw(); -$VERSION = '3.20'; +$VERSION = '3.21'; sub set_defaults { my $self = shift; @@ -225,7 +225,7 @@ sub submit { if ( $post_data{'x_Email_Customer'} && $post_data{'x_Email_Customer'} !~ /^FALSE$/i ) { $post_data{'x_Email_Customer'} = 'TRUE'; - } else { + } elsif ( exists $post_data{'x_Email_Customer'} ) { $post_data{'x_Email_Customer'} = 'FALSE'; } diff --git a/Changes b/Changes index 91f462c..a5b8266 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,9 @@ Revision history for Perl extension Business::OnlinePayment::AuthorizeNet. - Patch from Nate Nuss implementing ("Additional Shipping Information (Level 2 Data)" ~pg 24 in the AIM guide): tax, freight, duty, tax_exempt, po_number. Thanks! + - Patch from Michael Peters to fix a bug in email address handling: + exclude x_Email_Customer flag when it is not specified in content, + to avoid overriding admin settings. 3.20 Wed Jun 18 16:46:10 PDT 2008 - Patch from Erik Hollensbe implementing