testing account won't accept ACH transactions
[Business-OnlinePayment-OpenECHO.git] / t / bad_check.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 print "ok 1 # Skipped: testing account won't accept ACH transactions\n"; exit;
4
5 eval "use Net::SSLeay;";
6 if ( $@ ) {
7   print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit;
8 }
9
10 use Business::OnlinePayment;
11
12 # checks are broken it seems
13 my $ctx = new Business::OnlinePayment("OpenECHO",
14   payee          => 'Tofu Heavy Enterprises, GmbH',
15 );
16 $ctx->content(
17     type           => 'ECHECK',
18     'login'        => '123>4685706',
19     'password'     => '09437869',
20     action         => 'Normal Authorization',
21     amount         => '49.95',
22     invoice_number => '100100',
23     customer_id    => 'jsk',
24     first_name     => 'Tofu',
25     last_name      => 'Beast',
26     account_number => '12345',
27     routing_code   => '026009593',
28     bank_name      => 'First National Test Bank',
29     phone          => '420-420-5454',
30     #payee          => 'Tofu Heavy Enterprises, GmbH',
31     check_number   => '420',
32 );
33 $ctx->test_transaction(1); # test, dont really charge
34 $ctx->submit();
35
36 print $ctx->is_success()."\n";
37
38 if($ctx->is_success()) {
39     #warn $ctx->error_message();
40     print "not ok 1 (".$ctx->error_message().")\n";
41 } else {
42     print "ok 1\n";
43 }