it does need B:OP v3
[Business-OnlinePayment-Capstone.git] / t / crypt_bad_card.t
1 BEGIN {
2   $| = 1; print "1..1\n";
3   $Business::OnlinePayment::HTTPS::skip_NetSSLeay=1;
4   $Business::OnlinePayment::HTTPS::skip_NetSSLeay=1;
5 }
6
7 eval "use Crypt::SSLeay;";
8 if ( $@ ) {
9   print "ok 1 # Skipped: Crypt::SSLeay is not installed\n"; exit;
10 }
11
12 use Business::OnlinePayment;
13
14 my $tx = new Business::OnlinePayment("Capstone");
15
16 $tx->content(
17     type           => 'VISA',
18     login          => '10217',
19     password       => 'testing',
20     action         => 'Normal Authorization',
21     amount         => '32.32',
22     card_number    => '4342424242424242',
23     expiration     => '08/06',
24     cvv2           => '420',
25     name           => 'Tofu Beast',
26     address        => '123 Anystreet',
27     city           => 'Anywhere',
28     state          => 'UT',
29     zip            => '84058',
30     country        => 'US',
31     email          => 'ivan-capstone-test@420.am',
32 );
33 $tx->test_transaction(1); # test, dont really charge
34 $tx->submit();
35
36 if($tx->is_success()) {
37     print "not ok 1\n";
38 } else {
39     #warn $tx->server_response."\n";
40     #warn $tx->error_message. "\n";
41     print "ok 1\n";
42 }
43