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