1 BEGIN { $| = 1; print "1..2\n"; }
3 #testing/testing is valid and seems to work... (but not for auth + capture)
4 print "ok 1 # Skipped: need a valid Authorize.Net login/password to test\n";
5 print "ok 2 # Skipped: need a valid Authorize.Net login/password to test\n";
8 use Business::OnlinePayment;
10 my $tx = new Business::OnlinePayment("AuthorizeNet");
13 login => 'testing',# CHANGE THESE TO TEST
14 password => 'testing',#
15 action => 'Authorization Only',
16 description => 'Business::OnlinePayment visa test',
18 invoice_number => '100100',
22 address => '123 Anystreet',
26 card_number => '4007000000027',
27 expiration => '08/06',
29 $tx->test_transaction(1); # test, dont really charge
32 unless($tx->is_success()) {
36 my $order_number = $tx->order_number;
40 my $settle_tx = new Business::OnlinePayment("AuthorizeNet");
43 login => 'testing', # CHANGE THESE TO TEST
44 password => 'testing', #
45 action => 'Post Authorization',
46 description => 'Business::OnlinePayment visa test',
48 invoice_number => '100100',
49 order_number => '111',
50 card_number => '4007000000027',
51 expiration => '08/06',
54 $settle_tx->test_transaction(1); # test, dont really charge
57 if($settle_tx->is_success()) {
60 warn $settle_tx->error_message;