s/CHECK/ECHECK/, DOH
[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 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 # checks are broken it seems
15 my $ctx = new Business::OnlinePayment("OpenECHO");
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     print "ok 1\n";
40 } else {
41     warn $ctx->error_message();
42     print "not ok 1 (".$ctx->error_message().")\n";
43 }