add new test files to MANIFEST
[Business-OnlinePayment-TransactionCentral.git] / t / crypt_credit_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 require "t/lib/test_account.pl";
15 my($login, $regkey) = test_account_or_skip();
16
17 my $tx = new Business::OnlinePayment("TransactionCentral");
18
19 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
20 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
21 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
22 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
23
24 $tx->content(
25     type           => 'VISA',
26     login          => $login,
27     password       => $regkey,
28     action         => 'Normal Authorization',
29     description    => 'Business::OnlinePayment::TransactionCentral test',
30     amount         => '54.01',
31     card_number    => '4012000000001',
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 "ok 1\n";
47 } else {
48     #warn $tx->server_response."\n";
49     warn $tx->error_message. "\n";
50     print "not ok 1\n";
51 }
52