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