added changelog, boilerplate POD and README, tests. use test_transaction flag,...
[Business-OnlinePayment-Skipjack.git] / t / crypt_credit_card_visa.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("Skipjack");
15
16 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
17 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
18 #$Business::OnlinePayment::Skipjack::DEBUG = 1;
19 #$Business::OnlinePayment::Skipjack::DEBUG = 1;
20
21 $tx->content(
22     type           => 'VISA',
23     login          => '000368452762', # "HTML serial number"
24     action         => 'Normal Authorization',
25     description    => 'Business::OnlinePayment::Skipjack test',
26     amount         => '32',
27     card_number    => '4445999922225',
28     expiration     => '03/10',
29     cvv2           => '999',
30     name           => 'Tofu Beast',
31     address        => '8320',
32     city           => 'Anywhere',
33     state          => 'UT',
34     zip            => '85284',
35     phone          => '415-420-5454',
36     email          => 'ivan-skipjack-test@420.am',
37 );
38 $tx->test_transaction(1); # test, dont really charge
39 $tx->submit();
40
41 if($tx->is_success()) {
42     print "ok 1\n";
43 } else {
44     #warn $tx->server_response."\n";
45     warn $tx->error_message. "\n";
46     print "not ok 1\n";
47 }
48