initial import
[Business-OnlinePayment-IPaymentTPG.git] / t / check.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 print "ok 1 # Skipped: ACH unimplemented with this processor\n"; exit;
4
5 use Business::OnlinePayment;
6
7 # checks are broken it seems
8 my $ctx = new Business::OnlinePayment("IPaymentTPG");
9 $ctx->content(
10     type           => 'CHECK',
11     login          => 'testing',
12     password       => 'testing',
13     action         => 'Normal Authorization',
14     amount         => '49.95',
15     invoice_number => '100100',
16     customer_id    => 'jsk',
17     first_name     => 'Tofu',
18     last_name      => 'Beast',
19     account_number => '12345',
20     routing_code   => '123456789',
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 "ok 1\n";
30 } else {
31     print "not ok 1 (".$ctx->error_message().")\n";
32 }