projects
/
Business-OnlinePayment-LinkPoint.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
echeck imrovements
[Business-OnlinePayment-LinkPoint.git]
/
LinkPoint.pm
diff --git
a/LinkPoint.pm
b/LinkPoint.pm
index
43db12d
..
1e5b1ab
100644
(file)
--- a/
LinkPoint.pm
+++ b/
LinkPoint.pm
@@
-1,6
+1,6
@@
package Business::OnlinePayment::LinkPoint;
package Business::OnlinePayment::LinkPoint;
-# $Id: LinkPoint.pm,v 1.2
3 2005-01-07 02:53:50 ivan
Exp $
+# $Id: LinkPoint.pm,v 1.2
6 2007-04-07 00:00:31 jeff
Exp $
use strict;
use vars qw($VERSION @ISA $DEBUG @EXPORT @EXPORT_OK);
use strict;
use vars qw($VERSION @ISA $DEBUG @EXPORT @EXPORT_OK);
@@
-13,8
+13,8
@@
require Exporter;
@ISA = qw(Exporter AutoLoader Business::OnlinePayment);
@EXPORT = qw();
@EXPORT_OK = qw();
@ISA = qw(Exporter AutoLoader Business::OnlinePayment);
@EXPORT = qw();
@EXPORT_OK = qw();
-$VERSION = '0.0
5
';
-$DEBUG =
0
;
+$VERSION = '0.0
7
';
+$DEBUG =
1
;
use lpperl; #3; #lpperl.pm from LinkPoint
$LPPERL::VERSION =~ /^(\d+\.\d+)/
use lpperl; #3; #lpperl.pm from LinkPoint
$LPPERL::VERSION =~ /^(\d+\.\d+)/
@@
-46,6
+46,15
@@
sub map_fields {
);
$content{'action'} = $actions{lc($content{'action'})} || $content{'action'};
);
$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);
}
# stuff it back into %content
$self->content(%content);
}
@@
-103,6
+112,7
@@
sub submit {
unless ( $content{action} eq 'POSTAUTH'
|| ( $content{'action'} =~ /^(CREDIT|VOID)$/
&& exists $content{'order_number'} )
unless ( $content{action} eq 'POSTAUTH'
|| ( $content{'action'} =~ /^(CREDIT|VOID)$/
&& exists $content{'order_number'} )
+ || $self->transaction_type() =~ /^e?check$/i
) {
if ( $self->transaction_type() =~
) {
if ( $self->transaction_type() =~
@@
-131,6
+141,11
@@
sub submit {
$result ||= 'LIVE';
}
$result ||= 'LIVE';
}
+ #docs disagree with lpperl.pm here
+ $content{'voidcheck'} = 1
+ if ($self->transaction_type() =~ /^e?check$/i
+ && $content{'action'} =~ /^VOID$/);
+
$self->revmap_fields(
host => \( $self->server ),
port => \( $self->port ),
$self->revmap_fields(
host => \( $self->server ),
port => \( $self->port ),
@@
-144,13
+159,27
@@
sub submit {
cardexpyear => \$year,
chargetotal => 'amount',
oid => 'order_number',
cardexpyear => \$year,
chargetotal => 'amount',
oid => 'order_number',
+ bankname => 'bank_name',
+ bankstate => 'bank_state',
+ routing => 'routing_code',
+ account => 'account_number',
+ accounttype => 'account_type',
+ name => 'account_name',
+ dl => 'state_id',
+ dlstate => 'state_id_state',
);
my $lperl = new LPPERL;
);
my $lperl = new LPPERL;
- $self->required_fields(qw/
- host port configfile keyfile amount cardnumber cardexpmonth cardexpyear
- /);
+ 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() =~ /^e?check$/i) {
+ push @required_fields, qw(
+ dl dlstate routing account accounttype bankname bankstate name
+ );
+ }
+ $self->required_fields(@required_fields);
my %post_data = $self->get_fields(qw/
host port configfile keyfile
my %post_data = $self->get_fields(qw/
host port configfile keyfile
@@
-158,6
+187,8
@@
sub submit {
chargetotal cardnumber cardexpmonth cardexpyear
name email phone addrnum city state zip country
oid
chargetotal cardnumber cardexpmonth cardexpyear
name email phone addrnum city state zip country
oid
+ dl dlstate routing account accounttype bankname bankstate name void
+
/);
$post_data{'ordertype'} = $content{action};
/);
$post_data{'ordertype'} = $content{action};