initial import
[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 my $tx = new Business::OnlinePayment("TransactionCentral");
18
19 $tx->content(
20     type           => 'VISA',
21     login          => '10011',
22     password       => 'KK48NPYEJHMAH6DK', #regkey
23     action         => 'Normal Authorization',
24     amount         => '32.32',
25     #card_number    => '4012000000001',
26     card_number    => '4342424242424242',
27     expiration     => '08/06',
28     cvv2           => '420',
29     name           => 'Tofu Beast',
30     address        => '123 Anystreet',
31     city           => 'Anywhere',
32     state          => 'UT',
33     zip            => '84058',
34     country        => 'US',
35     email          => 'ivan-transactioncentral-test@420.am',
36 );
37 $tx->test_transaction(1); # test, dont really charge
38 $tx->submit();
39
40 if($tx->is_success()) {
41     print "not ok 1\n";
42 } else {
43     #warn $tx->server_response."\n";
44     #warn $tx->error_message. "\n";
45     print "ok 1\n";
46 }
47