initial import
[Business-OnlinePayment-PaymentsGateway.git] / t2 / 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     routing_code   => '123456789',
19     bank_name      => 'First National Test Bank',
20 );
21 $ctx->test_transaction(1); # test, dont really charge
22 $ctx->submit();
23
24 print $ctx->is_success()."\n";
25
26 if($ctx->is_success()) {
27     print "ok 1\n";
28 } else {
29     print "not ok 1 (".$ctx->error_message().")\n";
30 }