- Update for new test account.
[Business-OnlinePayment-LinkPoint.git] / t / echeck.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 $no_echeck_tests =
4   "Skipped: Linkpoint doesn't provide a way to test echecks\n";
5 warn $no_echeck_tests;
6 print "ok 1 # $no_echeck_tests";
7 exit;
8
9 use Business::OnlinePayment;
10
11 my $tx = new Business::OnlinePayment("LinkPoint",
12   'storename' => '1909796604',
13   'keyfile'   => './test.pem',
14   'server'    => 'staging.linkpt.net',
15 );
16
17 $tx->content(
18     type           => 'ECHECK',
19     action         => 'Normal Authorization',
20     description    => 'Business::OnlinePayment::LinkPoint echeck test',
21     amount         => '0.01',
22     first_name     => 'Tofu',
23     last_name      => 'Beast',
24     address        => '123 Anystreet',
25     city           => 'Anywhere',
26     state          => 'UT',
27     zip            => '84058',
28     country        => 'US',
29     email          => 'ivan-linkpoint@420.am',
30     account_number => '0027',
31     account_type   => 'Personal Checking',
32     routing_code   => '400700000',
33     bank_name      => 'SomeBank',
34     bank_state     => 'UT',
35 );
36
37 $tx->test_transaction(1);
38
39 $tx->submit();
40
41 if($tx->is_success()) {
42     print "ok 1\n";
43     #$auth = $tx->authorization;
44     #warn "********* $auth ***********\n";
45 } else {
46     print "not ok 1\n";
47     warn '***** '. $tx->error_message. " *****\n";
48     exit;
49 }
50