Skip Menu |

This queue is for tickets about the Business-OnlinePayment-AuthorizeNet CPAN distribution.

Report information
The Basics
Id: 22070
Status: resolved
Priority: 0/
Queue: Business-OnlinePayment-AuthorizeNet

People
Owner: ivan-pause [...] 420.am
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 3.15
  • 3.00
  • 3.01
  • 3.10
  • 3.11
  • 3.12
  • 3.13
  • 3.14
Fixed in:
  • 3.16
  • 3.17



Subject: credit_card.t expiration date expired
The expiration date used in credit_card.t is now expired. This patch makes the test use a date 11 months in the future so this will never happen. It also turns on the diagnositic warning on failure. The failure isn't very informative without it. --- t/credit_card.t (revision 19623) +++ t/credit_card.t (local) @@ -5,6 +5,10 @@ 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', @@ -22,7 +26,7 @@ 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(); @@ -30,6 +34,6 @@ if($tx->is_success()) { print "ok 1\n"; } else { - #warn $tx->error_message; print "not ok 1\n"; + warn $tx->error_message; }
checked into CVS, will be 3.16 On Fri Oct 13 02:31:54 2006, MSCHWERN wrote: Show quoted text
> The expiration date used in credit_card.t is now expired. > > This patch makes the test use a date 11 months in the future so this > will never happen. > > It also turns on the diagnositic warning on failure. The failure
isn't Show quoted text
> very informative without it. > > > --- t/credit_card.t (revision 19623) > +++ t/credit_card.t (local) > @@ -5,6 +5,10 @@ > > 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', > @@ -22,7 +26,7 @@ > 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(); > @@ -30,6 +34,6 @@ > if($tx->is_success()) { > print "ok 1\n"; > } else { > - #warn $tx->error_message; > print "not ok 1\n"; > + warn $tx->error_message; > }