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