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