808dc0729e6973c553a1a4ad29440609d12cf80c
[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   payee          => 'Tofu Heavy Enterprises, GmbH',
17 );
18 $ctx->content(
19     type           => 'ECHECK',
20     'login'        => '123>4685706',
21     'password'     => '09437869',
22     action         => 'Normal Authorization',
23     amount         => '49.95',
24     invoice_number => '100100',
25     customer_id    => 'jsk',
26     first_name     => 'Tofu',
27     last_name      => 'Beast',
28     account_number => '12345',
29     routing_code   => '026009593',
30     bank_name      => 'First National Test Bank',
31     phone          => '420-420-5454',
32     #payee          => 'Tofu Heavy Enterprises, GmbH',
33     check_number   => '420',
34 );
35 $ctx->test_transaction(1); # test, dont really charge
36 $ctx->submit();
37
38 print $ctx->is_success()."\n";
39
40 if($ctx->is_success()) {
41     print "ok 1\n";
42 } else {
43     warn $ctx->error_message();
44     print "not ok 1 (".$ctx->error_message().")\n";
45 }