Got settlements working by adding an order_number method for submitting the transacti...
[Business-OnlinePayment-AuthorizeNet.git] / t / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 print "ok 1 # Skipped: need a valid Authorize.Net login/password to test\n"; exit;
4
5 use Business::OnlinePayment;
6
7 my $tx = new Business::OnlinePayment("AuthorizeNet");
8 $tx->content(
9     type           => 'VISA',
10     login          => 'testdrive', # CHANGE THESE TO TEST
11     password       => 'testdrive', #
12     action         => 'Normal Authorization',
13     description    => 'Business::OnlinePayment visa test',
14     amount         => '49.95',
15     invoice_number => '100100',
16     customer_id    => 'jsk',
17     first_name     => 'Tofu',
18     last_name      => 'Beast',
19     address        => '123 Anystreet',
20     city           => 'Anywhere',
21     state          => 'UT',
22     zip            => '84058',
23     card_number    => '4007000000027',
24     expiration     => '08/06',
25 );
26 $tx->test_transaction(1); # test, dont really charge
27 $tx->submit();
28
29 if($tx->is_success()) {
30     print "ok 1\n";
31 } else {
32     print "not ok 1\n";
33 }