$csv->error is not a method.
[Business-OnlinePayment-Skipjack.git] / t / void_card_mc.t
1 BEGIN { $| = 1; print "1..2\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    => '5121212121212124',
24     expiration     => '03/10',
25     cvv2           => '999',
26     name           => 'Tofu Beast',
27     address        => '8320',
28     city           => 'Anywhere',
29     state          => 'UT',
30     zip            => '85284',
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 "ok 1\n";
39 } else {
40     #warn $tx->server_response."\n";
41     warn $tx->error_message. "\n";
42     print "not ok 1\n";
43 }
44
45 my $v_tx = new Business::OnlinePayment("Skipjack");
46
47 $v_tx->content(
48     type           => 'VISA',
49     login          => '000944785470', # "HTML serial number"
50     password       => '100594217288', # "developer serial number"
51     action         => 'Void',
52     description    => 'Business::OnlinePayment::Skipjack test',
53     order_number   => $tx->order_number(),
54 );
55
56 $v_tx->test_transaction(1); # test, dont really charge
57 $v_tx->submit();
58
59 if($v_tx->is_success()) {
60     print "ok 2\n";
61 } else {
62     #warn $v_tx->server_response."\n";
63     warn $v_tx->error_message. "\n";
64     print "not ok 2\n";
65 }
66
67
68
69