add new test files to MANIFEST
[Business-OnlinePayment-TransactionCentral.git] / t / credit_card_fs.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 eval "use Net::SSLeay;";
4 if ( $@ ) {
5   print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit;
6 }
7
8 use Business::OnlinePayment;
9
10 require "t/lib/test_account.pl";
11 my($login, $regkey) = test_account_or_skip();
12
13 my $tx = new Business::OnlinePayment("TransactionCentral");
14
15 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
16 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
17 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
18 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
19
20 $tx->content(
21     type           => 'VISA',
22     login          => $login,
23     password       => $regkey,
24     action         => 'Normal Authorization',
25     description    => 'Business::OnlinePayment::TransactionCentral test',
26     amount         => '32',
27
28     customer_id    => '54',
29     last_name      => 'Beast',
30     first_name     => 'Tofu',
31     name           => 'Tofu Beast',
32     address        => '123 Anystreet',
33     city           => 'Anywhere',
34     state          => 'UT',
35     zip            => '84058',
36     country        => 'US',
37
38     referer        => 'http://cleanwhisker.420.am/',
39     email          => 'ivan-transactioncentral-test@420.am',
40     #email          => 'tofubeast@example.com',
41     phone          => '530-555-3300',
42
43     'customer_ip'  => '5.4.3.2',
44     #invoice_number => '420',
45     card_number    => '4012000000001',
46     expiration     => '01/06',
47     cvv2           => '420',
48 );
49 $tx->test_transaction(1); # test, dont really charge
50 $tx->submit();
51
52 if($tx->is_success()) {
53     print "ok 1\n";
54 } else {
55     #warn $tx->server_response."\n";
56     warn $tx->error_message. "\n";
57     print "not ok 1\n";
58 }
59