5 my($login, $password, %opt) = ('TESTMERCHANT', '', 'Origin' => 'RECURRING' );
8 use_ok 'Business::OnlinePayment';
13 password => $password,
14 action => 'Normal Authorization',
18 account_number => '12345',
19 routing_code => '111000025', # BoA in Texas taken from Wikipedia
20 bank_name => 'First National Test Bank',
21 account_type => 'Checking',
28 my $ctx = Business::OnlinePayment->new("IPPay", %opt);
29 $ctx->content(%content);
32 desc => 'normal ACH transaction',
35 error_message => 'CHECK ACCEPTED',
36 authorization => qr/^000000$/,
39 $voidable = $ctx->order_number if $ctx->is_success;
44 my $ctx = Business::OnlinePayment->new("IPPay", %opt);
45 $ctx->content(%content, action => 'void', order_number => $voidable);
48 desc => 'ACH void transaction',
51 error_message => 'CHECK ACCEPTED',
52 authorization => qr/^000000$/,
58 my $ctx = Business::OnlinePayment->new("IPPay", %opt);
59 $ctx->content(%content, action => 'credit');
62 desc => 'ACH credit transaction',
65 error_message => 'CHECK ACCEPTED',
66 authorization => qr/^000000$/,
74 $tx->test_transaction(1);
77 is( $tx->is_success, $o{is_success}, "$o{desc}: " . tx_info($tx) );
78 is( $tx->result_code, $o{result_code}, "result_code(): RESULT" );
79 is( $tx->error_message, $o{error_message}, "error_message() / RESPMSG" );
80 like( $tx->authorization, $o{authorization}, "authorization() / AUTHCODE" );
81 like( $tx->order_number, qr/^\w{18}/, "order_number() / PNREF" );
87 no warnings 'uninitialized';
91 "is_success(", $tx->is_success, ")",
92 " order_number(", $tx->order_number, ")",
93 " error_message(", $tx->error_message, ")",
94 " result_code(", $tx->result_code, ")",
95 " auth_info(", $tx->authorization, ")",