package Business::OnlinePayment::LinkPoint;
-# $Id: LinkPoint.pm,v 1.25 2007-04-05 23:12:06 jeff Exp $
+# $Id: LinkPoint.pm,v 1.26 2007-04-07 00:00:31 jeff Exp $
use strict;
use vars qw($VERSION @ISA $DEBUG @EXPORT @EXPORT_OK);
@ISA = qw(Exporter AutoLoader Business::OnlinePayment);
@EXPORT = qw();
@EXPORT_OK = qw();
-$VERSION = '0.06';
-$DEBUG = 0;
+$VERSION = '0.07';
+$DEBUG = 1;
use lpperl; #3; #lpperl.pm from LinkPoint
$LPPERL::VERSION =~ /^(\d+\.\d+)/
);
$content{'action'} = $actions{lc($content{'action'})} || $content{'action'};
+ #ACCOUNT TYPE MAP
+ my %account_types = ('personal checking' => 'pc',
+ 'personal savings' => 'ps',
+ 'business checking' => 'bc',
+ 'business savings' => 'bs',
+ );
+ $content{'account_type'} = $account_types{lc($content{'account_type'})}
+ || $content{'account_type'};
+
# stuff it back into %content
$self->content(%content);
}
unless ( $content{action} eq 'POSTAUTH'
|| ( $content{'action'} =~ /^(CREDIT|VOID)$/
&& exists $content{'order_number'} )
- || $self->transaction_type() =~ /^check$/i
+ || $self->transaction_type() =~ /^e?check$/i
) {
if ( $self->transaction_type() =~
#docs disagree with lpperl.pm here
$content{'voidcheck'} = 1
- if ($self->transaction_type() =~ /^check$/i
+ if ($self->transaction_type() =~ /^e?check$/i
&& $content{'action'} =~ /^VOID$/);
$self->revmap_fields(
chargetotal => 'amount',
oid => 'order_number',
bankname => 'bank_name',
+ bankstate => 'bank_state',
routing => 'routing_code',
account => 'account_number',
accounttype => 'account_type',
my @required_fields = qw(host port configfile keyfile amount);
if ($self->transaction_type() =~ /^(cc|visa|mastercard|american express|discover)$/i) {
push @required_fields, qw(cardnumber cardexpmonth cardexpyear);
- }elsif ($self->transaction_type() =~ /^check$/i) {
+ }elsif ($self->transaction_type() =~ /^e?check$/i) {
push @required_fields, qw(
dl dlstate routing account accounttype bankname bankstate name
);