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