initial import
[Business-OnlinePayment-PPIPayMover.git] / t / bad_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 eval "use Net::SSLeay;";
4 if ( $@ ) {
5   print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit;
6 }
7
8 use Business::OnlinePayment;
9
10 my $tx = new Business::OnlinePayment("PPIPayMover");
11 $tx->content(
12     type           => 'VISA',
13     'login'        => '195325FCC230184964CAB3A8D93EEB31888C42C714E39CBBB2E541884485D04B', #token
14     action         => 'Normal Authorization',
15     description    => 'Business::OnlinePayment visa test',
16     amount         => '0.10',
17     invoice_number => '100100',
18     customer_id    => 'jsk',
19     first_name     => 'Tofu',
20     last_name      => 'Beast',
21     address        => '123 Anystreet',
22     city           => 'Anywhere',
23     state          => 'UT',
24     zip            => '84058',
25     phone          => '420-543-2199',
26     card_number    => '4007000000027',
27     expiration     => '08/09',
28 );
29 $tx->test_transaction(1); # test, dont really charge
30 $tx->submit();
31
32 if($tx->is_success()) {
33     print "not ok 1\n";
34 } else {
35     #warn $tx->server_response."\n";
36     #warn $tx->error_message. "\n";
37     print "ok 1\n";
38 }