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