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