summaryrefslogtreecommitdiff
path: root/t/check.t
blob: d64d49ca3b33bf30ccb77bc4faedf2a9f42f641f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
BEGIN { $| = 1; print "1..1\n"; }

print "ok 1 # Skipped: no ACH test yet\n"; exit;

use Business::OnlinePayment;

# checks are broken it seems
my $ctx = new Business::OnlinePayment("OpenECHO");
$ctx->content(
    type           => 'CHECK',
    login          => 'testing',
    password       => 'testing',
    action         => 'Normal Authorization',
    amount         => '49.95',
    invoice_number => '100100',
    customer_id    => 'jsk',
    first_name     => 'Tofu',
    last_name      => 'Beast',
    account_number => '12345',
    routing_code   => '123456789',
    bank_name      => 'First National Test Bank',
);
$ctx->test_transaction(1); # test, dont really charge
$ctx->submit();

print $ctx->is_success()."\n";

if($ctx->is_success()) {
    print "ok 1\n";
} else {
    print "not ok 1 (".$ctx->error_message().")\n";
}