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