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