we need B:OP v3, declare so in Makefile.PL
[Business-OnlinePayment-OpenECHO.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("OpenECHO");
15 $tx->content(
16     type           => 'VISA',
17     'login'        => '123>4685706',
18     'password'     => '09437869',
19     action         => 'Normal Authorization',
20     description    => 'Business::OnlinePayment visa test',
21     amount         => '49.95',
22     invoice_number => '100100',
23     customer_id    => 'jsk',
24     first_name     => 'Tofu',
25     last_name      => 'Beast',
26     address        => '123 Anystreet',
27     city           => 'Anywhere',
28     state          => 'UT',
29     zip            => '84058',
30     phone          => '420-543-2199',
31     card_number    => '4007000000027',
32     expiration     => '08/06',
33 );
34 $tx->test_transaction(1); # test, dont really charge
35 $tx->submit();
36
37 if($tx->is_success()) {
38     print "not ok 1\n";
39 } else {
40     #warn $tx->server_response."\n";
41     #warn $tx->error_message. "\n";
42     print "ok 1\n";
43 }
44