X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=AuthorizeNet%2FARB.pm;h=cc8289b06137795691a6f84e084920e37727f619;hb=65608cf88ed2170bc6bcad01a0c55b70dc4b3082;hp=16fddaee8ded1d64c201097e1cdb59c3d61e34da;hpb=511331906b11bc8f104f49b164a0a4b262099b0d;p=Business-OnlinePayment-AuthorizeNet.git diff --git a/AuthorizeNet/ARB.pm b/AuthorizeNet/ARB.pm index 16fddae..cc8289b 100644 --- a/AuthorizeNet/ARB.pm +++ b/AuthorizeNet/ARB.pm @@ -10,7 +10,7 @@ use Tie::IxHash; use vars qw($VERSION $DEBUG @ISA $me); @ISA = qw(Business::OnlinePayment::AuthorizeNet Business::OnlinePayment::HTTPS); -$VERSION = '0.01'; +$VERSION = '0.02'; $DEBUG = 0; $me='Business::OnlinePayment::AuthorizeNet::ARB'; @@ -39,7 +39,7 @@ sub map_fields { 'cancel recurring authorization' => 'ARBCancelSubscriptionRequest', ); - $content{'action'} = $actions{lc($content{'action'})} || $content{'action'}; + $content{'action'} = $actions{lc($content{'action'} || '')} || $content{'action'}; # TYPE MAP my %types = ('visa' => 'CC', @@ -48,7 +48,7 @@ sub map_fields { 'discover' => 'CC', 'check' => 'ECHECK', ); - $content{'type'} = $types{lc($content{'type'})} || $content{'type'}; + $content{'type'} = $types{lc($content{'type'} || '')} || $content{'type'}; $self->transaction_type($content{'type'}); # ACCOUNT TYPE MAP @@ -57,7 +57,7 @@ sub map_fields { 'business checking' => 'businessChecking', 'business savings' => 'savings', ); - $content{'account_type'} = $account_types{lc($content{'account_type'})} + $content{'account_type'} = $account_types{lc($content{'account_type'} || '')} || $content{'account_type'}; # MASSAGE EXPIRATION @@ -162,7 +162,6 @@ sub submit { startDate => 'start', totalOccurrences => 'periods', trialOccurrences => 'trialperiods', - phoneNumber => 'phone', ); tie my %account, 'Tie::IxHash', ( @@ -241,6 +240,7 @@ sub submit { tie my %sub, 'Tie::IxHash', $self->revmap_fields( + name => 'subscription_name', paymentSchedule => \%schedule, amount => 'amount', trialAmount => 'trialamount',