projects
/
Business-OnlinePayment-LinkPoint.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bae4cd5
)
echeck imrovements
author
jeff
<jeff>
Sat, 7 Apr 2007 00:00:31 +0000
(
00:00
+0000)
committer
jeff
<jeff>
Sat, 7 Apr 2007 00:00:31 +0000
(
00:00
+0000)
Changes
patch
|
blob
|
history
LinkPoint.pm
patch
|
blob
|
history
t2/echeck.t
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
304b300
..
d85f6d3
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,5
+1,13
@@
Revision history for Perl extension Business::OnlinePayment::LinkPoint.
Revision history for Perl extension Business::OnlinePayment::LinkPoint.
+0.07 Thu Apr 6 18:27:32 2007 UTC
+ - Add account type mapping
+ - map bank_state onto bankstate
+ - make echeck synonymous with check
+
+0.06 Thu Apr 5 22:59:27 2007 UTC
+ - Add check capability
+
0.05 Thu Jan 6 16:11:01 PST 2005
- Add patch from William McKee <william@knowmad.com> to support
returns by order number
0.05 Thu Jan 6 16:11:01 PST 2005
- Add patch from William McKee <william@knowmad.com> to support
returns by order number
diff --git
a/LinkPoint.pm
b/LinkPoint.pm
index
71015f7
..
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
5 2007-04-05 23:12:06
jeff 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
6
';
-$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,7
+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() =~ /^check$/i
+ || $self->transaction_type() =~ /^
e?
check$/i
) {
if ( $self->transaction_type() =~
) {
if ( $self->transaction_type() =~
@@
-134,7
+143,7
@@
sub submit {
#docs disagree with lpperl.pm here
$content{'voidcheck'} = 1
#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(
&& $content{'action'} =~ /^VOID$/);
$self->revmap_fields(
@@
-151,6
+160,7
@@
sub submit {
chargetotal => 'amount',
oid => 'order_number',
bankname => 'bank_name',
chargetotal => 'amount',
oid => 'order_number',
bankname => 'bank_name',
+ bankstate => 'bank_state',
routing => 'routing_code',
account => 'account_number',
accounttype => 'account_type',
routing => 'routing_code',
account => 'account_number',
accounttype => 'account_type',
@@
-164,7
+174,7
@@
sub submit {
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);
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
);
push @required_fields, qw(
dl dlstate routing account accounttype bankname bankstate name
);
diff --git
a/t2/echeck.t
b/t2/echeck.t
index
b21d5d4
..
24dca67
100644
(file)
--- a/
t2/echeck.t
+++ b/
t2/echeck.t
@@
-20,9
+20,11
@@
$tx->content(
zip => '84058',
country => 'US',
email => 'ivan-linkpoint@420.am',
zip => '84058',
country => 'US',
email => 'ivan-linkpoint@420.am',
- card_number => '4007000000027',
- expiration => '12/2008',
- bankstate => 'UT',
+ account_number => '0027',
+ account_type => 'Personal Checking',
+ routing_code => '400700000',
+ bank_name => 'SomeBank',
+ bank_state => 'UT',
);
$tx->test_transaction(1);
);
$tx->test_transaction(1);