add these tests
[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 my $tx = new Business::OnlinePayment("TransactionCentral");
11
12 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
13 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
14 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
15 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
16
17 $tx->content(
18     type           => 'VISA',
19     login          => '10011',
20     password       => 'KK48NPYEJHMAH6DK', #regkey
21     action         => 'Normal Authorization',
22     description    => 'Business::OnlinePayment::TransactionCentral test',
23     amount         => '32',
24
25     customer_id    => '54',
26     last_name      => 'Beast',
27     first_name     => 'Tofu',
28     name           => 'Tofu Beast',
29     address        => '123 Anystreet',
30     city           => 'Anywhere',
31     state          => 'UT',
32     zip            => '84058',
33     country        => 'US',
34
35     referer        => 'http://cleanwhisker.420.am/',
36     email          => 'ivan-transactioncentral-test@420.am',
37     #email          => 'tofubeast@example.com',
38     phone          => '530-555-3300',
39
40     'customer_ip'  => '5.4.3.2',
41     #invoice_number => '420',
42     card_number    => '4012000000001',
43     expiration     => '01/06',
44     cvv2           => '420',
45 );
46 $tx->test_transaction(1); # test, dont really charge
47 $tx->submit();
48
49 if($tx->is_success()) {
50     print "ok 1\n";
51 } else {
52     #warn $tx->server_response."\n";
53     warn $tx->error_message. "\n";
54     print "not ok 1\n";
55 }
56