initial import
[Business-OnlinePayment-PayflowPro.git] / t / bad_auth.t
1 BEGIN { $| = 1; print "1..2\n"; }
2
3 use Business::OnlinePayment;
4
5 my $tx = new Business::OnlinePayment("PayflowPro",
6 #  'storename' => '000000',
7 #  'keyfile'   => '/path/to/cert.pem',
8 #  'lbin'      => '/path/to/lbin',
9 #  'tmp'       => '/path/to/secure/tempdir',
10 );
11
12 $tx->content(
13     type           => 'VISA',
14     action         => 'Normal Authorization',
15     description    => 'Business::OnlinePayment::PayflowPro visa test',
16     amount         => '0.01',
17     first_name     => 'Tofu',
18     last_name      => 'Beast',
19     address        => '123 Anystreet',
20     city           => 'Anywhere',
21     state          => 'UT',
22     zip            => '84058',
23     country        => 'US',
24     email          => 'ivan-payflowpro@420.am',
25     card_number    => '4007000000027',
26     expiration     => '12/2002',
27 #    result         => 'DECLINE',
28 );
29
30 $tx->test_transaction(1);
31
32 $tx->submit();
33
34 if($tx->is_success()) {
35     print "not ok 1\n";
36     $auth = $tx->authorization;
37     warn "********* $auth ***********\n";
38 } else {
39     print "ok 1\n";
40     warn '***** '. $tx->error_message. " *****\n";
41     exit;
42 }
43