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