initial import
[Business-OnlinePayment-IPaymentTPG.git] / t / bad_auth.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $tx = new Business::OnlinePayment("IPaymentTPG",
6 );
7
8 $tx->content(
9     login          => 'testing', #CHANGE THESE TO TEST
10     password       => 'testing',
11     type           => 'VISA',
12     action         => 'Normal Authorization',
13     description    => 'Business::OnlinePayment::IPaymentTPG visa test',
14     amount         => '0.01',
15     first_name     => 'Tofu',
16     last_name      => 'Beast',
17     address        => '123 Anystreet',
18     city           => 'Anywhere',
19     state          => 'UT',
20     zip            => '84058',
21     country        => 'US',
22     email          => 'ivan-linkpoint@420.am',
23 #    card_number    => '4007000000027',
24     card_number    => '0000000000000',
25     expiration     => '12/2002',
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