local URLs for docs
[Business-OnlinePayment-VirtualNet.git] / t / bad_auth.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 $DEBUG = 0;
6 $Business::OnlinePayment::VirtualNet::DEBUG = $DEBUG;
7 $Business::OnlinePayment::VirtualNet::DEBUG += 0; #quiet warnings with old perl
8
9 #     Use this merchant information for testing only. 
10 #  
11 #     Bin= 999995 Agent = 000000 Chain = 111111 Merchant = 888000002200
12 # Store = 5999 Terminal = 1515
13 #      Mcc = 5999 .
14 #    If you are doing AVS (address Ver ) use this address  8320 zip 85284.
15
16 my $tx = new Business::OnlinePayment("VirtualNet",,
17     'merchant_id' => '888000002200',
18     'store'       => '5999',
19     'terminal'    => '1515',
20     'mcc'         => '5999', #merchant category code
21     'bin'         => '999995', #acquirer BIN
22     'zip'         => '543211420', #merchant zip (US) or assigned city code
23
24     'agent'       => '000000',
25     'v'           => '00000001',
26
27     'merchant_name'  => 'Internet Service Provider', #25 char max
28     'merchant_city'  => 'Gloucester', #13 char max
29     'merchant_state' => 'VA', #2 char
30
31     'seq_file'    => '/tmp/bop-virtualnet-sequence',
32     'batchnum_file' => '/tmp/bop-virtualnet-batchnum', # :/  0-999 in 5 days
33 );
34 $tx->content(
35     type           => 'CC',
36     action         => 'Authorization only',
37     description    => 'Business::OnlinePayment visa test',
38     amount         => '999910.00',
39     invoice_number => '100100',
40     customer_id    => 'jsk',
41     first_name     => 'Tofu',
42     last_name      => 'Beast',
43     address        => '8320 Anystreet',
44     city           => 'Anywhere',
45     state          => 'UT',
46     zip            => '85284',
47     card_number    => '4111111111111111',
48     expiration     => '09/03',
49 );
50 $tx->test_transaction(1); # test, dont really charge (doesn't do anything with VirtualNet)
51 $tx->submit();
52
53 if($tx->is_success()) {
54     print "not ok 1\n";
55     warn '** ('. $tx->result_code. ') '. $tx->error_message. " **\n" if $DEBUG;
56     warn $tx->error_message if $DEBUG;
57 } else {
58     warn '** ('. $tx->result_code. ') '. $tx->error_message. " **\n" if $DEBUG;
59     print "ok 1\n";
60 }