4 require "t/lib/test_account.pl";
6 my($login, $password, %opt) = test_account_or_skip('check');
9 use_ok 'Business::OnlinePayment';
14 password => $password,
15 action => 'Normal Authorization',
19 account_number => '12345',
20 routing_code => '111000025', # BoA in Texas taken from Wikipedia
21 bank_name => 'First National Test Bank',
22 account_type => 'Business Checking',
29 my $ctx = Business::OnlinePayment->new("IPPay", %opt);
30 $ctx->content(%content);
33 desc => 'normal ACH transaction',
36 error_message => 'CHECK ACCEPTED',
37 authorization => qr/^000000$/,
40 $voidable = $ctx->order_number if $ctx->is_success;
45 my $ctx = Business::OnlinePayment->new("IPPay", %opt);
46 $ctx->content(%content, action => 'void', order_number => $voidable);
49 desc => 'ACH void transaction',
52 error_message => 'CHECK ACCEPTED',
53 authorization => qr/^000000$/,
59 my $ctx = Business::OnlinePayment->new("IPPay", %opt);
60 $ctx->content(%content, action => 'credit');
63 desc => 'ACH credit transaction',
66 error_message => 'CHECK ACCEPTED',
67 authorization => qr/^000000$/,
75 $tx->test_transaction(1);
78 is( $tx->is_success, $o{is_success}, "$o{desc}: " . tx_info($tx) );
79 is( $tx->result_code, $o{result_code}, "result_code(): RESULT" );
80 is( $tx->error_message, $o{error_message}, "error_message() / RESPMSG" );
81 like( $tx->authorization, $o{authorization}, "authorization() / AUTHCODE" );
82 like( $tx->order_number, qr/^\w{18}/, "order_number() / PNREF" );
88 no warnings 'uninitialized';
92 "is_success(", $tx->is_success, ")",
93 " order_number(", $tx->order_number, ")",
94 " error_message(", $tx->error_message, ")",
95 " result_code(", $tx->result_code, ")",
96 " auth_info(", $tx->authorization, ")",