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 'zip' => '543211420', #merchant zip (US) or assigned city code
23 'agent' => '000000', #agent bank
26 'merchant_name' => 'Internet Service Provider', #25 char max
27 'merchant_city' => 'Gloucester', #13 char max
28 'merchant_state' => 'VA', #2 char
30 'seq_file' => '/tmp/bop-virtualnet-sequence',
31 'batchnum_file' => '/tmp/bop-virtualnet-batchnum', # :/ 0-999 in 5 days
36 action => 'Authorization only',
37 description => 'Business::OnlinePayment visa test',
39 invoice_number => '100100',
44 address => '123 Anystreet',
48 card_number => '4111111111111111',
49 expiration => '09/03',
51 $tx->test_transaction(1); # test, dont really charge (doesn't do anything with VirtualNet)
54 if($tx->is_success()) {
55 print "ok 1 (". $tx->authorization. ")\n";
56 warn "(auth ok ". $tx->authorization. ")\n" if $DEBUG;
58 warn "(auth) ** (". $tx->result_code. ') '. $tx->error_message. "**\n"
66 action => 'Post Authorization',
67 amount => '999910.00',
68 card_number => '4111111111111111',
69 expiration => '09/03',
70 authorization => $tx->authorization,
71 authorization_source_code => $tx->authorization_source_code,
72 returned_ACI => $tx->returned_ACI,
73 transaction_identifier => $tx->transaction_identifier,
74 validation_code => $tx->validation_code,
75 transaction_sequence_num => $tx->transaction_sequence_num,
76 #description => 'Business::OnlinePayment::BankOfAmerica visa test',
81 if($tx->is_success()) {
84 warn '(capture) ** ('.$tx->result_code.') '. $tx->error_message. " **\n"