finally working
[Business-OnlinePayment-PaymentsGateway.git] / t / bad_check.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $ctx = new Business::OnlinePayment("PaymentsGateway");
6 $ctx->content(
7     type           => 'CHECK',
8     login          => '2000',
9     password       => 'merchant4demo',
10     action         => 'Normal Authorization',
11     amount         => '49.95',
12     invoice_number => '100100',
13     customer_id    => 'jsk',
14     first_name     => 'Tofu',
15     last_name      => 'Beast',
16     account_number => '12345',
17     #account_number => 'badaccountnumber',
18     routing_code   => '123456789',
19     #routing_code   => 'badroutingcode',
20     bank_name      => 'First National Test Bank',
21 );
22 $ctx->test_transaction(1); # test, dont really charge
23 $ctx->submit();
24
25 print $ctx->is_success()."\n";
26
27 if($ctx->is_success()) {
28     print "not ok 1\n";
29 } else {
30     #warn $ctx->error_message();
31     print "ok 1\n";
32 }