initial import
[Business-OnlinePayment-PXPost.git] / t / credit_card.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("PXPost");
11
12 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
13 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
14 #$Business::OnlinePayment::PXPost::DEBUG = 1;
15 #$Business::OnlinePayment::PXPost::DEBUG = 1;
16
17 $tx->content(
18     type           => 'VISA',
19     login          => 'Unicalldev',
20     password       => 'ds4gj7',
21     action         => 'Normal Authorization',
22     name           => 'Tofu Beast',
23     amount         => '54.01',
24     card_number    => '4111111111111111',
25     expiration     => '01/06',
26 );
27 $tx->test_transaction(1); # test, dont really charge
28 $tx->submit();
29
30 if($tx->is_success()) {
31     print "ok 1\n";
32 } else {
33     #warn $tx->server_response."\n";
34     warn $tx->error_message. "\n";
35     print "not ok 1\n";
36 }
37