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