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