inital checking of OpenECHO module
[Business-OnlinePayment-OpenECHO.git] / t / bad_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("OpenECHO");
11 $tx->content(
12     type           => 'VISA',
13     #login          => '123>4684752',
14     login          => '1234684752',
15     password       => '43400210',
16     action         => 'Normal Authorization',
17     description    => 'Business::OnlinePayment visa test',
18     amount         => '49.95',
19     invoice_number => '100100',
20     customer_id    => 'jsk',
21     first_name     => 'Tofu',
22     last_name      => 'Beast',
23     address        => '123 Anystreet',
24     city           => 'Anywhere',
25     state          => 'UT',
26     zip            => '84058',
27     phone          => '420-543-2199',
28     card_number    => '4007000000027',
29     expiration     => '08/06',
30 );
31 $tx->test_transaction(1); # test, dont really charge
32 $tx->submit();
33
34 if($tx->is_success()) {
35     print "not ok 1\n";
36 } else {
37     #warn $tx->server_response."\n";
38     #warn $tx->error_message. "\n";
39     print "ok 1\n";
40 }