B:OP:WesternACH start
[Business-OnlinePayment-WesternACH.git] / t / check.t
1 #!/usr/bin/perl -w
2
3 use Test::More;
4 require 't/lib/test_account.pl';
5
6 my($login, $password) = test_account_or_skip();
7 plan tests => 2;
8
9 use_ok 'Business::OnlinePayment';
10
11 my $tx = Business::OnlinePayment->new('WesternACH');
12 $tx->content(
13   type      =>  'echeck',
14   login     =>  $login,
15   password  =>  $password, 
16   action    =>  'Normal Authorization',
17   description => 'Business::OnlinePayment checking test',
18   amount    =>  '40.18',
19   invoice_number => '10999',
20   customer_id => 'nobody',
21   first_name  => 'John',
22   last_name => 'Doe',
23   address   => '123 Anywhere',
24   city      => 'Sacramento',
25   state     => 'CA',
26   zip       => '95824',
27   account_number => '100012345678',
28   routing_code  => '111000025',
29   account_type  => 'Checking',
30 );
31 $tx->submit();
32
33 ok($tx->is_success()) or diag $tx->error_message;
34