1 BEGIN { $| = 1; print "1..2\n"; }
3 use Business::OnlinePayment;
6 $Business::OnlinePayment::VirtualNet::DEBUG = $DEBUG;
7 $Business::OnlinePayment::VirtualNet::DEBUG += 0; #quiet warnings with old perl
9 # Use this merchant information for testing only.
11 # Bin= 999995 Agent = 000000 Chain = 111111 Merchant = 888000002200
12 # Store = 5999 Terminal = 1515
14 # If you are doing AVS (address Ver ) use this address 8320 zip 85284.
16 my $tx = new Business::OnlinePayment("VirtualNet",
17 'merchant_id' => '888000002200',
20 'mcc' => '5999', #merchant category code
21 'bin' => '999995', #acquirer BIN
22 #'bin' => '999700', #acquirer BIN
23 'zip' => '543211420', #merchant zip (US) or assigned city code
25 'agent' => '000000', #agent bank
28 'merchant_name' => 'Internet Service Provider', #25 char max
29 'merchant_city' => 'Gloucester', #13 char max
30 'merchant_state' => 'VA', #2 char
32 'seq_file' => '/tmp/bop-virtualnet-sequence',
33 'batchnum_file' => '/tmp/bop-virtualnet-batchnum', # :/ 0-999 in 5 days
38 action => 'Authorization only',
39 description => 'Business::OnlinePayment visa test',
42 invoice_number => '100100',
47 address => '8320 Anystreet',
51 card_number => '4111111111111111',
52 expiration => '09/03',
53 # card_number => '5499740000000057',
54 # expiration => '01/05',
55 # card_number => '6011000993026909',
56 # expiration => '01/04',
59 $tx->test_transaction(1); # test, dont really charge (doesn't do anything with VirtualNet)
62 if($tx->is_success()) {
63 print "ok 1 (". $tx->authorization. ")\n";
64 warn "(auth ok ". $tx->authorization. ")\n" if $DEBUG;
66 warn "(auth) ** (". $tx->result_code. ') '. $tx->error_message. "**\n"
74 action => 'Post Authorization',
77 card_number => '4111111111111111',
78 expiration => '09/03',
79 # card_number => '5499740000000057',
80 # expiration => '01/05',
81 # card_number => '6011000993026909',
82 # expiration => '01/04',
84 authorization => $tx->authorization,
85 authorization_source_code => $tx->authorization_source_code,
86 returned_ACI => $tx->returned_ACI,
87 transaction_identifier => $tx->transaction_identifier,
88 validation_code => $tx->validation_code,
89 transaction_sequence_num => $tx->transaction_sequence_num,
90 local_transaction_date => $tx->local_transaction_date,
91 local_transaction_time => $tx->local_transaction_time,
92 AVS_result_code => $tx->AVS_result_code,
93 #description => 'Business::OnlinePayment::VirtualNet test',
98 if($tx->is_success()) {
101 warn '(capture) ** ('.$tx->result_code.') '. $tx->error_message. " **\n"