1 BEGIN { $| = 1; print "1..4\n"; }
3 eval "use Net::SSLeay;";
5 print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit;
8 use Business::OnlinePayment;
10 my $tx = new Business::OnlinePayment("Skipjack");
12 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
13 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
14 #$Business::OnlinePayment::Skipjack::DEBUG = 1;
15 #$Business::OnlinePayment::Skipjack::DEBUG = 1;
17 my $login = $ENV{'sj_html_serial_number'} || '000843232776';
18 my $password = $ENV{'sj_devel_serial_number'} || '100025931874';
22 login => $login, # "HTML serial number"
23 password => $password, # "Developer serial number"
24 action => 'Normal Authorization',
25 description => 'Business::OnlinePayment::Skipjack test',
27 card_number => '4445999922225',
28 expiration => '03/10',
35 phone => '415-420-5454',
36 email => 'ivan-skipjack-test@420.am',
38 $tx->test_transaction(1); # test, dont really charge
41 if($tx->is_success()) {
44 #warn $tx->server_response."\n";
45 warn $tx->error_message. "\n";
51 my $pa_tx = new Business::OnlinePayment("Skipjack");
55 login => $login, # "HTML serial number"
56 password => $password, # "Developer serial number"
57 action => 'Post Authorization',
58 description => 'Business::OnlinePayment::Skipjack test',
59 order_number => $tx->order_number(),
62 $pa_tx->test_transaction(1); #test
65 if($pa_tx->is_success()) {
68 # warn "STATUS : ". $st_tx->status(). "\n";
69 # warn "PENDING: ". $st_tx->pending_status(). "\n";
72 #warn $pa_tx->server_response."\n";
73 warn $pa_tx->error_message. "\n";
79 my $st_tx = new Business::OnlinePayment("Skipjack");
83 login => $login, # "HTML serial number"
84 password => $password, # "Developer serial number"
86 description => 'Business::OnlinePayment::Skipjack test',
87 order_number => $tx->order_number(),
90 $st_tx->test_transaction(1); #test
93 if($st_tx->is_success()) {
96 #warn "STATUS : ". $st_tx->status(). "\n";
97 #warn "PENDING: ". $st_tx->pending_status(). "\n";
100 #warn $st_tx->server_response."\n";
101 warn $st_tx->error_message. "\n";
107 print "ok 4 # Skipped: Credit needs a settled transaction\n"; exit;
109 my $cr_tx = new Business::OnlinePayment("Skipjack");
113 login => $login, # "HTML serial number"
114 password => $password, # "Developer serial number"
116 description => 'Business::OnlinePayment::Skipjack test',
118 order_number => $tx->order_number(),
121 $cr_tx->test_transaction(1); # test, dont really charge
124 if($cr_tx->is_success()) {
127 #warn $cr_tx->server_response."\n";
128 warn $cr_tx->error_message. "\n";