finish echeck/ACH support, fix parsing of Auth field containing whitespace, fix order...
[Business-OnlinePayment-TransactionCentral.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 my $ctx = new Business::OnlinePayment("TransactionCentral");
13
14 $ctx->content(
15     type           => 'ECHECK',
16     login          => '10011',
17     password       => 'KK48NPYEJHMAH6DK', #regkey
18     action         => 'Normal Authorization',
19     amount         => '49.95',
20     invoice_number => '100100',
21     customer_id    => 'jsk',
22     name           => 'Tofu Beast',
23     account_number => '12345',
24     #routing_code   => '026009593',
25     routing_code   => 'bad_routing_code',
26     bank_name      => 'First National Test Bank',
27     phone          => '420-420-5454',
28     #payee          => 'Tofu Heavy Enterprises, GmbH',
29     check_number   => '420',
30 );
31 $ctx->test_transaction(1); # test, dont really charge
32 $ctx->submit();
33
34 #print $ctx->is_success()."\n";
35
36 if($ctx->is_success()) {
37     #warn $ctx->error_message();
38     print "not ok 1 (".$ctx->error_message().")\n";
39 } else {
40     print "ok 1\n";
41 }