finish echeck/ACH support, fix parsing of Auth field containing whitespace, fix order...
[Business-OnlinePayment-TransactionCentral.git] / t / check.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $ctx = Business::OnlinePayment->new("TransactionCentral");
6
7 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
8 #$Business::OnlinePayment::TransactionCentral::DEBUG = 1;
9
10 $ctx->content(
11     type           => 'CHECK',
12     login          => '10011',
13     password       => 'KK48NPYEJHMAH6DK', #regkey
14     action         => 'Normal Authorization',
15     amount         => '49.95',
16     invoice_number => '100100',
17     customer_id    => 'jsk',
18     name           => 'Tofu Beast',
19     account_number => '12345',
20     routing_code   => '111000025',  # BoA in Texas taken from Wikipedia
21     bank_name      => 'First National Test Bank',
22     account_type   => 'Checking',
23     license_num    => '12345678',
24     license_state  => 'OR',
25     license_dob    => '1975-05-21',
26 );
27 $ctx->test_transaction(1); # test, dont really charge
28 $ctx->submit();
29
30 if($ctx->is_success()) {
31     print "ok 1\n";
32 } else {
33     warn "error message : ". $ctx->error_message(). "\n";
34     warn "response code : ". $ctx->response_code(). "\n";
35     warn "response page : ". $ctx->response_page(). "\n";
36
37     print "not ok 1 (".$ctx->error_message().")\n";
38 }