Debian Codegraph @

t/check.t

raw
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 print "ok 1 # Skipped: testing account won't accept ACH transactions\n"; exit;
4
5 eval "use Net::SSLeay;";
6 if ( $@ ) {
7 print "ok 1 # Skipped: Net::SSLeay is not installed\n"; exit;
8 }
9
10 use Business::OnlinePayment;
11
12 my $ctx = new Business::OnlinePayment( "OpenECHO",
13 'payee' => 'Tofu Heavy Enterprises, GmbH',
14 );
15
16 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
17 #$Business::OnlinePayment::HTTPS::DEBUG = 1;
18 #$Business::OnlinePayment::OpenECHO::DEBUG = 1;
19 #$Business::OnlinePayment::OpenECHO::DEBUG = 1;
20
21 # checks are broken it seems?
22 $ctx->content(
23 type => 'ECHECK',
24 'login' => '123>4685706',
25 'password' => '09437869',
26 action => 'Normal Authorization',
27 amount => '49.95',
28 invoice_number => '100100',
29 customer_id => 'jsk',
30 first_name => 'Tofu',
31 last_name => 'Beast',
32 account_number => '12345',
33 routing_code => '026009593',
34 bank_name => 'First National Test Bank',
35 phone => '420-420-5454',
36 #payee => 'Tofu Heavy Enterprises, GmbH',
37 check_number => '420',
38 );
39 $ctx->test_transaction(1); # test, dont really charge
40 $ctx->submit();
41
42 print $ctx->is_success()."\n";
43
44 if($ctx->is_success()) {
45 print "ok 1\n";
46 } else {
47 warn $ctx->error_message();
48 print "not ok 1 (".$ctx->error_message().")\n";
49 }