projects
/
Business-OnlinePayment-Network1Financial.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2b36ee5
)
expiration fix
author
ivan
<ivan>
Fri, 13 Dec 2002 00:39:39 +0000
(
00:39
+0000)
committer
ivan
<ivan>
Fri, 13 Dec 2002 00:39:39 +0000
(
00:39
+0000)
Network1Financial.pm
patch
|
blob
|
history
t/credit_card.t
patch
|
blob
|
history
diff --git
a/Network1Financial.pm
b/Network1Financial.pm
index
343c624
..
5358ec8
100644
(file)
--- a/
Network1Financial.pm
+++ b/
Network1Financial.pm
@@
-123,7
+123,10
@@
sub submit {
croak "$type not (yet) supported";
}
- ( my $exp = $content{'expiration'} ) =~ s/\///;
+ $content{'expiration'} =~ s/(\d+)\/(\d+)$/;
+ my($m, $y) = ($1, $2);
+ $m = '0$m' if $m<10;
+ my $exp = "$m$y";
$self->revmap_fields(
'M_id' => 'login',
diff --git
a/t/credit_card.t
b/t/credit_card.t
index
3c27806
..
2d87d4a
100644
(file)
--- a/
t/credit_card.t
+++ b/
t/credit_card.t
@@
-20,7
+20,7
@@
$tx->content(
state => 'UT',
zip => '84058',
card_number => '4111111111111111',
- expiration => '
0
1/05',
+ expiration => '1/05',
);
$tx->test_transaction(1); # test, dont really charge
$tx->submit();