0.06!
[Business-OnlinePayment-TransactionCentral.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 print "ok 1 # Skipped: No way to get a decline response out of test account";
8 exit;
9
10 eval "use Crypt::SSLeay;";
11 if ( $@ ) {
12   print "ok 1 # Skipped: Crypt::SSLeay is not installed\n"; exit;
13 }
14
15 use Business::OnlinePayment;
16
17 require "t/lib/test_account.pl";
18 my($login, $regkey) = test_account_or_skip();
19
20 my $tx = new Business::OnlinePayment("TransactionCentral");
21
22 $tx->content(
23     type           => 'VISA',
24     login          => $login,
25     password       => $regkey,
26     action         => 'Normal Authorization',
27     amount         => '32.32',
28     #card_number    => '4012000000001',
29     card_number    => '4342424242424242',
30     expiration     => '08/06',
31     cvv2           => '420',
32     name           => 'Tofu Beast',
33     address        => '123 Anystreet',
34     city           => 'Anywhere',
35     state          => 'UT',
36     zip            => '84058',
37     country        => 'US',
38     email          => 'ivan-transactioncentral-test@420.am',
39 );
40 $tx->test_transaction(1); # test, dont really charge
41 $tx->submit();
42
43 if($tx->is_success()) {
44     print "not ok 1\n";
45 } else {
46     #warn $tx->server_response."\n";
47     #warn $tx->error_message. "\n";
48     print "ok 1\n";
49 }
50