working post auth support
[Business-OnlinePayment-AuthorizeNet.git] / t / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
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;
5
6 use Business::OnlinePayment;
7
8 my $tx = new Business::OnlinePayment("AuthorizeNet");
9 $tx->content(
10     type           => 'VISA',
11     login          => 'testing',
12     password       => 'testing',
13     action         => 'Normal Authorization',
14     description    => 'Business::OnlinePayment visa test',
15     amount         => '49.95',
16     invoice_number => '100100',
17     customer_id    => 'jsk',
18     first_name     => 'Tofu',
19     last_name      => 'Beast',
20     address        => '123 Anystreet',
21     city           => 'Anywhere',
22     state          => 'UT',
23     zip            => '84058',
24     card_number    => '4007000000027',
25     expiration     => '08/06',
26 #    company        => 'Company co',
27 #    country        => 'US',
28 );
29 $tx->test_transaction(1); # test, dont really charge
30 $tx->submit();
31
32 if($tx->is_success()) {
33     print "ok 1\n";
34 } else {
35     #warn $tx->error_message;
36     print "not ok 1\n";
37 }