projects
/
Business-OnlinePayment-AuthorizeNet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bad299a
)
From Michael G. Schwern: Fix t/credit_card.t test to use a date 11 months in the...
author
ivan
<ivan>
Wed, 18 Oct 2006 01:54:43 +0000
(
01:54
+0000)
committer
ivan
<ivan>
Wed, 18 Oct 2006 01:54:43 +0000
(
01:54
+0000)
Changes
patch
|
blob
|
history
t/credit_card.t
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
ff6bfe4
..
1e858de
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-10,6
+10,8
@@
Revision history for Perl extension Business::OnlinePayment::AuthorizeNet.
screws up the error messages.
- account_type mentioned twice in the required fields for checks.
- Quiet an uninit value warning when customer_org is not set.
screws up the error messages.
- account_type mentioned twice in the required fields for checks.
- Quiet an uninit value warning when customer_org is not set.
+ - Fix t/credit_card.t test to use a date 11 months in the future as
+ the expiration date, and to print the error message on failure.
3.15 Wed Mar 16 01:10:51 PST 2005
- Ask for ',' delimiter and '"' quote explicitly to prevent problems
3.15 Wed Mar 16 01:10:51 PST 2005
- Ask for ',' delimiter and '"' quote explicitly to prevent problems
diff --git
a/t/credit_card.t
b/t/credit_card.t
index
a41e14e
..
0063804
100644
(file)
--- a/
t/credit_card.t
+++ b/
t/credit_card.t
@@
-5,6
+5,10
@@
BEGIN { $| = 1; print "1..1\n"; }
use Business::OnlinePayment;
use Business::OnlinePayment;
+my($month, $year) = (localtime)[4,5];
+$year++; # So we expire next year.
+$year %= 100; # y2k? What's that?
+
my $tx = new Business::OnlinePayment("AuthorizeNet");
$tx->content(
type => 'VISA',
my $tx = new Business::OnlinePayment("AuthorizeNet");
$tx->content(
type => 'VISA',
@@
-22,7
+26,7
@@
$tx->content(
state => 'UT',
zip => '84058',
card_number => '4007000000027',
state => 'UT',
zip => '84058',
card_number => '4007000000027',
- expiration =>
'08/06'
,
+ expiration =>
sprintf("%02d/%02d", $month, $year)
,
);
$tx->test_transaction(1); # test, dont really charge
$tx->submit();
);
$tx->test_transaction(1); # test, dont really charge
$tx->submit();
@@
-30,6
+34,6
@@
$tx->submit();
if($tx->is_success()) {
print "ok 1\n";
} else {
if($tx->is_success()) {
print "ok 1\n";
} else {
-
#
warn $tx->error_message;
+ warn $tx->error_message;
print "not ok 1\n";
}
print "not ok 1\n";
}