s/CHECK/ECHECK/, DOH
[Business-OnlinePayment-OpenECHO.git] / t / check.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 # checks are broken it seems
11 my $ctx = new Business::OnlinePayment("OpenECHO");
12 $ctx->content(
13     type           => 'ECHECK',
14     'login'        => '123>4685706',
15     'password'     => '09437869',
16     action         => 'Normal Authorization',
17     amount         => '49.95',
18     invoice_number => '100100',
19     customer_id    => 'jsk',
20     first_name     => 'Tofu',
21     last_name      => 'Beast',
22     account_number => '12345',
23     routing_code   => '026009593',
24     bank_name      => 'First National Test Bank',
25     phone          => '420-420-5454',
26     payee          => 'Tofu Heavy Enterprises, GmbH',
27     check_number   => '420',
28 );
29 $ctx->test_transaction(1); # test, dont really charge
30 $ctx->submit();
31
32 print $ctx->is_success()."\n";
33
34 if($ctx->is_success()) {
35     print "ok 1\n";
36 } else {
37     warn $ctx->error_message();
38     print "not ok 1 (".$ctx->error_message().")\n";
39 }