1 BEGIN { $| = 1; print "1..1\n"; }
3 #testing/testing is valid and seems to work...
4 #print "ok 1 # Skipped: need a valid Authorize.Net login/password to test\n"; exit;
6 use Business::OnlinePayment;
8 my($month, $year) = (localtime)[4,5];
9 $year++; # So we expire next year.
10 $year %= 100; # y2k? What's that?
12 my $tx = new Business::OnlinePayment("AuthorizeNet");
16 password => 'testing',
17 action => 'Normal Authorization',
18 description => 'Business::OnlinePayment visa test',
20 invoice_number => '100100',
24 address => '123 Anystreet',
28 card_number => '4007000000027',
29 expiration => sprintf("%02d/%02d", $month, $year),
31 $tx->test_transaction(1); # test, dont really charge
34 if($tx->is_success()) {
37 warn $tx->error_message;