1 package Business::OnlinePayment::VirtualNet;
7 use Business::OnlinePayment;
8 #use Business::CreditCard;
9 use Net::SSLeay qw( make_form post_https );
10 use String::Parity qw(setEvenParity isEvenParity);
12 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $DEBUG);
16 @ISA = qw(Exporter AutoLoader Business::OnlinePayment);
23 use vars qw( $STX $ETX $FS $ETB );
24 $STX = pack("C", 0x02 );
25 $ETX = pack("C", 0x03 );
26 $FS = pack("C", 0x1c );
27 $ETB = pack("C", 0x17 );
28 #$EOT = pack("C", 0x04 );
30 ##should be configurable **FIXME**
31 my $industry_code = '0';
35 $self->server('ssl.pgs.wcom.net');
37 $self->path('/scripts/gateway.dll?Transact');
39 $self->build_subs(qw( authorization_source_code returned_ACI
40 transaction_sequence_num transaction_identifier
46 my %content = $self->content();
48 $content{$_} = ref($map{$_})
52 $self->content(%content);
56 my($self,@fields) = @_;
58 my %content = $self->content();
60 foreach( grep defined $content{$_}, @fields) { $new{$_} = $content{$_}; }
66 my %content = $self->content;
68 my $action = lc($content{'action'});
69 #die 'eSec only supports "Authorization Only" transactions'
70 # unless $action eq 'authorization only';
73 # "VISA card" => 'visa',
74 # "MasterCard" => 'mastercard',
75 # "Discover card" => 'discover', #not supported...
76 # "American Express card" => 'amex',
77 # "Diner's Club/Carte Blanche" => 'dinersclub',
78 # "enRoute" => 'enroute', #not supported...
80 # "BankCard" => 'bankcard',
82 #my $cardtype = $self->test_transaction
84 # : $typemap{cardtype($content{'card_number'})};
87 if ( $self->transaction_type() =~
88 /^(cc|visa|mastercard|american express|discover)$/i ) {
89 $self->required_fields(qw/type action amount card_number expiration/);
91 croak("VirtualNet can't handle transaction type: ".
92 $self->transaction_type());
95 #my %content = $self->content;
98 warn "content:$_ => $content{$_}\n" foreach keys %content;
101 my( $message, $mimetype );
102 if ( $action eq 'authorization only' ) {
103 $message = $self->eis1080_request( \%content );
104 $mimetype = 'x-Visa-II/x-auth';
105 } elsif ( $action eq 'post authorization' ) {
106 $message = $self->eis1081_request( \%content );
107 $mimetype = 'x-Visa-II/x-settle';
108 } elsif ( $action eq 'normal authorization' ) {
109 croak 'Normal Authorization not supported';
110 } elsif ( $action eq 'credit' ) {
111 croak 'Credit not (yet) supported';
115 warn "post_data:$message\n";
118 my $server = $self->server();
119 my $port = $self->port();
120 my $path = $self->path();
121 my($page,$response,%headers) =
122 post_https($server,$port,$path,'',$message, $mimetype );
124 #warn "Response: $page";
127 die "protocol unsucessful: empty response, status $response\n";
130 if ( $page =~ /^(\d+)\s+\-\s+(\S.*)$/ ) {
131 die "VirtualNet protocol error: $page";
132 #$self->is_success(0);
133 #$self->result_code($1);
134 #$self->error_message($2);
135 #$self->error_message($page);
137 warn "protocol sucessful, decoding VisaNet-II response\n" if $DEBUG;
139 isEvenParity($page) or die "VisaNet-II response not even parity";
141 $page =~ s/(.)/pack('C', unpack('C',$1) & 0x7f)/ge; #drop parity bits
146 if ( $action eq 'authorization only' ) {
147 %response = $self->eis1080_response( $page );
148 } elsif ( $action eq 'post authorization' ) {
149 %response = $self->eis1081_response( $page );
150 #} elsif ( $action eq 'normal authorization' ) {
151 # croak 'Normal Authorization not supported';
152 #} elsif ( $action eq 'credit' ) {
153 # croak 'Credit not (yet) supported';
156 # $self->is_success($response{is_success});
157 # $self->result_code($response{result_code});
158 # $self->error_message($response{error_message});
159 # $self->authorization($response{authorization});
161 for my $field ( qw( is_success result_code error_message authorization
162 authorization_source_code returned_ACI
163 transaction_identifier validation_code
164 transaction_sequence_num ) ) {
165 $self->$field($response{$field});
175 my $content = 'D4.999995';
176 #my $content = 'D2.999995';
177 #my $content = 'D0.999995';
184 $message = setEvenParity $message;
187 warn "post_data: $message\n";
188 warn "post_data hex dump: ". join(" ", unpack("H*", $message) ). "\n";
191 my $server = $self->server();
192 my $port = $self->port();
193 my $path = $self->path();
194 my($page,$response,%headers) =
195 post_https($server,$port,$path,'',$message, 'x-Visa-II/x-auth');
197 #warn "Response: $page";
199 if ( $page =~ /^(\d+)\s+\-\s+(\S.*)$/ ) {
200 die "VirtualNet protocol error: $page";
201 #$self->is_success(0);
202 #$self->result_code($1);
203 #$self->error_message($2);
204 #$self->error_message($page);
206 warn "protocol sucessful, not decoding VisaNet-II response" if $DEBUG;
207 $self->is_success(1);
212 sub eis1080_request {
213 my( $self, $param ) = @_;
214 # card_number expiration address zip amount
216 #D-Format Authorization Request Message (Non-Set Electronic Commerce)
218 # my $zip = $param->{zip};
220 # $zip = substr("$zip ",0,9); #Left-justified/Space-filled
222 $param->{expiration} =~ /^(\d{1,2})\D+(\d{2})?(\d{2})$/
223 or croak "unparsable expiration ". $param->{expiration};
224 my ($month, $year) = ( $1, $3 );
225 $month = "0$month" if length($month) < 2;
226 my $exp= "$month$year";
228 #my $zip = $param->{zip};
230 #$zip = substr("$zip ",0,9);
232 my $amount = $param->{amount};
235 my $zip = substr( $self->zip. " ", 0, 9 );
237 my $seq_file = $self->seq_file;
238 my $counter = File::CounterFile->new($seq_file, '0001')
239 or die "can't create sequence file $seq_file: $!";
242 my $seq = substr('0000'.$counter->inc, -4);
243 $seq = substr('0000'.$counter->inc, -4) if $seq eq '0000';
246 # Byte Length Field: Content
248 my $content = 'D4.'; # 1 1 Record format: D
249 # 2 1 Application Type: 4=Interleaved
250 # 3 1 Message Delimiter: .
251 $content .= $self->bin; # 4-9 6 Acquirer BIN
252 $content .= $self->merchant_id; # 10-21 12 Merchant Number
253 $content .= $self->store; # 22-25 4 Store Number
254 $content .= $self->terminal; # 26-29 4 Terminal Number
255 $content .= 'C'; # 30 1 Device Code: C="P.C."
256 #$content .= 'M'; # 30 1 Device Code: M="Main Frame"
257 $content .= $industry_code; # 31 1 Industry Code
258 $content .= '840'; # 32-34 3 Currency Code: 840=U.S. Dollars
259 $content .= '840'; # 35-37 3 Country Code: 840=United States
260 $content .= $zip; # 38-46 9 (Merchant) City Code(Zip);
261 $content .= '00'; # 47-48 2 Language Indicator: 00=English
263 $content .= '705'; # 49-51 3 Time Zone Differential: 705=EST
264 $content .= $self->mcc; # 52-55 4 Metchant Category Code: 5999
265 $content .= 'N'; # 56 1 Requested ACI (Authorization
266 # Characteristics Indicator):
267 # N=Device is not CPS capable
268 $content .= $seq; # 57-60 4 Tran Sequence Number
269 $content .= '56'; # 61-62 2 Auth Transaction Code:
270 # 56=Card Not Present
271 $content .= 'N'; # 63 1 Cardholder ID Code: N=AVS
272 # (Address Verification Data or
273 # CPS/Card Not Present or
274 # Electronic Commerce)
275 $content .= '@'; # 64 1 Account Data Source:
278 die "content-length should be 64!" unless length($content) == 64;
280 # - 5-76 Customer Data Field: Acct#<FS>ExpDate<FS>
281 $content .= $param->{card_number}. $FS. $exp. $FS;
283 # - 1 Field Separator
286 # - 0-29 Address Verification Data
287 $content .= substr($param->{address}, 0, 23)." ". substr($param->{zip}, 0, 5);
289 $content .= $FS; # - 1 Field Separator
290 $content .= $FS; # - 1 Field Separator
292 $content .= $amount; # - 1-12 Transaction Amount
294 $content .= $FS; # - 1 Field Separator
295 $content .= $FS; # - 1 Field Separator
296 $content .= $FS; # - 1 Field Separator
299 $content .= substr($self->merchant_name.(' 'x25),0,25);
302 $content .= substr($self->merchant_city.(' 'x13),0,13);
305 $content .= substr($self->merchant_state.('X'x2),0,2);
307 $content .= $FS; # - 1 Field Separator
308 $content .= $FS; # - 1 Field Separator
309 $content .= $FS; # - 1 Field Separator
313 $content .= '014'; # - 3 Group III Version Number:
314 #014=MOTO/Electronic Commerce
316 $content .= '7'; # - 1 MOTO/Electronic Com. Ind: 7= Non-Authenticated
317 # Security transaction, such as a channel-encrypted
318 # transaction (e.g., ssl, DES or RSA)
328 $message = setEvenParity $message;
333 sub eis1080_response {
334 my( $self, $response) = @_;
337 $response =~ /^$STX(.{67})([\w ]{0,15})$FS([\w ]{0,4})$FS.*$ETX(.)$/
338 or die "can't decode (eis1080) response: $response\n". join(' ', map { sprintf("%x", unpack('C',$_)) } split('', $response) );
339 ( $response{transaction_identifier},
340 $response{validation_code},
345 join(' ', map { sprintf("%x", unpack('C',$_)) } split('', $response) ).
350 $response{record_format},
351 $response{application_type},
352 $response{message_delimiter},
353 $response{returned_ACI},
354 $response{store_number},
355 $response{terminal_number},
356 $response{authorization_source_code},
357 $response{transaction_sequence_num},
358 $response{response_code},
359 $response{approval_code},
360 $response{local_transaction_date},
361 $response{local_transaction_time},
362 $response{auth_response_text},
363 $response{AVS_result_code},
364 $response{retrieval_reference_num},
365 $response{market_specific_data_id},
366 ) = unpack "AAAAA4A4A1A4A2A6A6A6A16A1A12A1", $1;
368 if ( $response{record_format} ne "E" ) {
369 die "unknown response record_format $response{record_format}";
371 if ( $response{application_type} ne "4" ) {
372 die "unknown response record_format $response{application_type}";
374 if ( $response{message_delimiter} ne "." ) {
375 die "unknown response record_format $response{message_delimiter}";
378 $response{is_success} = $response{response_code} =~ /^(00|85)$/;
379 $response{result_code} = $response{response_code};
380 $response{error_message} = $response{auth_response_text};
381 $response{authorization} = $response{approval_code};
382 #$response{returned_ACI} = $response{returned_ACI};
383 #$response{authorization_source_code} = $response{authorization_source_code};
384 #$response{transaction_sequence_num} = $response{transaction_sequence_num};
389 sub eis1081_request {
390 my( $self, $param ) = @_;
392 my $batchnum_file = $self->batchnum_file;
393 my $counter = File::CounterFile->new($batchnum_file, '001')
394 or die "can't create batchnumuence file $batchnum_file: $!";
397 my $batchnum = substr('000'.$counter->inc, -3);
398 $batchnum = substr('000'.$counter->inc, -3) if $batchnum eq '000';
401 #K-Format Header Record (Base Group)
402 #Byte Length Frmt Field description Content Section
403 # Byte Length Field: Content (section)
404 my $header = 'K1.ZH@@@@'; # 1 1 A/N Record Format: K (4.154)
405 # 2 1 NUM Application Type: 1=Single Batch
407 # 3 1 A/N Message Delimiter: . (4.123)
408 # 4 1 A/N X.25 Routing ID: Z (4.226)
409 # 5-9 5 A/N Record Type: H@@@@ (4.155)
410 $header .= $self->bin; # 10-15 6 NUM Acquirer BIN (4.2)
411 $header .= $self->agent; # 16-21 6 NUM Agent Bank Number (4.5)
412 $header .= $self->can('chain') ? $self->chain : '000000';
413 # 22-27 6 NUM Agent Chain Number (4.6)
414 $header .= $self->merchant_id;
415 # 28-39 12 NUM Merchant Number (4.121)
416 $header .= $self->store; # 40-43 4 NUM Store Number (4.187)
417 $header .= $self->terminal; # 44-47 4 NUM Terminal Number 9911 (4.195)
418 $header .= 'C'; # 48 1 A/N Device Code: C="P.C." (4.62)
419 #$header .= 'M'; # 48 1 A/N Device Code M="Main Frame" (4.62)
420 $header .= $industry_code; # 49 1 A/N Industry Code (4.94)
421 $header .= '840'; # 50-52 3 NUM Currency Code (4.52)
422 $header .= '00'; # 53-54 2 NUM Language Indicator: 00=English
425 $header .= '705'; # 55-57 3 NUM Time Zone Differential (4.200)
427 my $mmdd = substr(time2str('0%m%d',time),-4);
428 $header .= $mmdd; # 58-61 4 NUM Batch Transmission Date MMDD (4.22)
430 $header .= $batchnum; # 62-64 3 NUM Batch Number 001 - 999 (4.18)
431 $header .= '0'; # 65 1 NUM Blocking Indicator 0=Not Blocked
434 die "header length should be 65!" unless length($header) == 65;
443 my $zip = substr( $self->zip. " ", 0, 9 );
445 #K-Format Parameter Record (Base Group)
446 #Byte Length Frmt Field Description Content Section
448 my $parameter = 'K1.ZP@@@@'; # 1 1 A/N Record Format: K (4.154)
449 # 2 1 NUM Application Type: 1=Single Batch
451 # 3 1 A/N Message Delimiter: . (4.123)
452 # 4 1 A/N X.25 Routing ID: Z (4.226)
453 # 5-9 5 A/N Record Type: P@@@@ (4.155)
454 $parameter .= '840'; # 10-12 3 NUM Country Code 840 4.47
455 $parameter .= $zip; # 13-21 9 A/N City Code
456 # Left-Justified/Space-Filled 4.43
457 $parameter .= $self->mcc; # 22-25 4 NUM Merchant Category Code (4.116)
459 # 26-50 25 A/N Merchant Name Left-Justified/Space-Filled (4.27.1)
460 $parameter .= substr($self->merchant_name.(' 'x25),0,25);
462 #51-63 13 A/N Merchant City Left-Justified/Space-Filled (4.27.2)
463 $parameter .= substr($self->merchant_city.(' 'x13),0,13);
465 # 64-65 2 A/N Merchant State (4.27.3)
466 $parameter .= substr($self->merchant_state.('X'x2),0,2);
468 $parameter .= '00001'; # 66-70 5 A/N Merchant Location Number 00001 4.120
470 $parameter .= $self->v; # 71-78 8 NUM Terminal ID Number 00000001 4.194
472 die "parameter length should be 78 (is ". length($parameter). ")!"
473 unless length($parameter) == 78;
482 # K-Format Detail Record (Electronic Commerce)
483 #Byte Size Frmt Field Description Content Section
485 my $detail = 'K1.ZD@@`D'; # 1 1 A/N Record Format: K (4.154)
486 # 2 1 NUM Application Type 1=Single Batch
488 # 3 1 A/N Message Delimiter: . (4.123)
489 # 4 1 A/N X.25 Routing ID: Z (4.226)
490 # 5-9 5 A/N Record Type: D@@`D (4.155)
492 $detail .= '56'; # 10-11 2 A/N Transaction Code:
493 # 56 = Card Not Present
495 $detail .= 'N'; # 12 1 A/N Cardholder Identification Code N 4.32
496 # (Address Verification Data or
497 # CPS/Card Not Present or
498 # Electronic Commerce)
499 $detail .= '@'; # 13 1 A/N Account Data Source Code @ = No Cardreader 4.1
502 #14-35 22 A/N Cardholder Account Number Left-Justified/Space-Filled 4.30
503 $detail .= substr( $param->{card_number}.' ', 0, 22 );
505 $detail .= 'N'; # 36 1 Requested ACI (Authorization
506 # Characteristics Indicator):
509 # 37 1 A/N Returned ACI (4.168)
510 $detail .= $param->{returned_ACI} || 'N';
512 # *** 38 1 A/N Authorization Source Code (4.13)
513 $detail .= $param->{authorization_source_code} || '6';
515 # 39-42 4 NUM Transaction Sequence Number Right-Justified/Zero-Filled (4.207)
516 die "missing transaction_sequence_num"
517 unless $param->{transaction_sequence_num};
518 $detail .= $param->{transaction_sequence_num};
520 $detail .= '00'; # ###FIXME (from auth)*** 43-44 2 A/N Response Code 4.164
522 # 45-50 6 A/N Authorization Code Left-Justified/Space-Filled (4.12)
523 $detail .= $param->{authorization};
527 my $mmdd = substr(time2str('0%m%d',$time),-4);
528 $detail .= $mmdd; # 51-54 4 NUM Local Transaction Date MMDD (4.113)
530 my $hhmmss = time2str('%H%M%S',$time);
531 $detail .= $hhmmss; # 55-60 6 NUM Local Transaction Time HHMMSS (4.114)
533 $detail .= '0'; #***FIXME (from auth) 61 1 A/N AVS Result Code 4.3
535 # 62-76 15 A/N Transaction Identifier Left-Justified/Space-Filled 4.206
536 $detail .= substr($param->{transaction_identifier}. (' 'x15), 0, 15);
538 # 77-80 4 A/N Validation Code 4.218
539 $detail .= substr($param->{validation_code}.' ', 0, 4);
541 $detail .= ' '; # 81 1 A/N Void Indicator <SPACE> = Not Voided 4.224
542 $detail .= '00'; # 82-83 2 NUM Transaction Status Code 00 4.208
543 $detail .= '0'; # 84 1 A/N Reimbursement Attribute 0 4.157
545 my $amount = $param->{amount};
547 $amount = substr('000000000000'.$amount,-12);
549 $detail .= $amount; # 85-96 12 NUM Settlement Amount
550 # Right-Justified/Zero-Filled 4.175
552 $detail .= $amount; # 97-108 12 NUM Authorized Amount
553 # Right-Justified/Zero-Filled 4.14
555 $detail .= $amount; # 109-120 12 NUM Total Authorized Amount
556 # Right-Justified/Zero-Filled 4.201
558 # $detail .= '1'; # 121 1 A/N Purchase Identifier Format Code 1 4.150
560 # # 122-146 25 A/N Purchase Identifier Left-Justified/Space-Filled 4.149
561 # $detail .= 'Internet Services ';
562 # #1234567890123456789012345
564 $detail .= '0'; # 121 1 A/N Purchase Identifier Format Code 1 4.150
566 # 122-146 25 A/N Purchase Identifier Left-Justified/Space-Filled 4.149
568 #1234567890123456789012345
570 $detail .= '01'; # ??? 147-148 2 NUM Multiple Clearing Sequence Number 4.129
571 $detail .= '01'; # ??? 149-150 2 NUM Multiple Clearing Sequence Count 1.128
572 $detail .= '7'; # 151 1 A/N MOTO/Electronic Commerce Indicator 7 = Channel Encrypted 4.127
574 die "detail length should be 151 (is ". length($detail). ")"
575 unless length($detail) == 151;
584 # K-Format Trailer Record
585 #Byte Length Frmt Field Description Content Section
587 my $trailer = 'K1.ZT@@@@';
588 #1 1 A/N Record Format K 4.154
589 #2 1 NUM Application Type 1=Single 3=Multiple Batch 4.10
590 #3 1 A/N Message Delimiter . 4.123
591 #4 1 A/N X.25 Routing ID Z 4.226
592 #5-9 5 A/N Record Type T@@@@ 4.155
594 $trailer .= $mmdd; # 10-13 4 NUM Batch Transmission Date MMDD 4.22
595 $trailer .= $batchnum; # 14-16 3 NUM Batch Number 001 - 999 4.18
596 $trailer .= '000000004'; # 17-25 9 NUM Batch Record Count
597 #Right-Justified/Zero-Filled 4.19
598 $trailer .= '0000'.$amount; # 26-41 16 NUM Batch Hashing Total
599 #Purchases + Returns 4.16
600 $trailer .= '0000000000000000'; # 42-57 16 NUM Cashback Total 4.38
601 $trailer .= '0000'.$amount; # 58-73 16 NUM Batch Net Deposit
602 # Purchases - Returns 4.17
604 die "trailer length should be 73!" unless length($trailer) == 73;
615 $message = setEvenParity $message;
621 sub eis1081_response {
622 my( $self, $response ) = @_;
625 $response =~ /^$STX(.{41})(.*)$ETX(.)$/
626 or die "can't decode (eis1081) response: $response";
631 $response{record_format},
632 $response{application_type},
633 $response{message_delimiter},
634 $response{x25_routing_id},
635 $response{record_type},
636 $response{batch_record_count},
637 $response{batch_net_deposit},
638 $response{batch_response_code},
640 $response{batch_number},
641 ) = unpack "AAAAA5A9A16A2A2A3", $1;
642 warn "$1\n" if $DEBUG;
644 if ( $response{record_format} ne "K" ) {
645 die "unknown response record_format $response{record_format}";
647 if ( $response{application_type} ne "1" ) {
648 die "unknown response record_format $response{application_type}";
650 if ( $response{message_delimiter} ne "." ) {
651 die "unknown response record_format $response{message_delimiter}";
654 if ( $response{is_success} = $response{batch_response_code} eq 'GB' ) {
655 $response{result_code} = $response{batch_response_code};
656 $response{error_message} = '';
657 } elsif ( $response{batch_response_code} eq 'RB' ) {
658 $response{result_code} = $response{batch_response_code};
659 #$remainder =~ /^(.)(.{4})(.)(..)(.{32})$/
660 $remainder =~ /^(.)(.{4})(.)(..)(.*)$/
661 or die "can't decode (eis1081) RB response (41+ ". length($remainder).
663 my( $error_type, $error_record_sequence_number, $error_record_type,
664 $error_data_field_number, $error_data ) = ( $1, $2, $3, $4, $5 );
666 B => 'Blocked Terminal',
667 C => 'Card Type Error',
669 E => 'Error in Batch',
670 S => 'Sequence Error',
671 T => 'Transmission Error',
672 U => 'Unknown Error',
673 V => 'Routing Error',
675 my %error_record_type = (
676 H => 'Header Record',
677 P => 'Parameter Record',
678 D => 'Detail Record',
679 T => 'Trailer Record',
681 $response{error_message} = 'Auth sucessful but capture rejected: '.
682 $error_type{$error_type}. ' in '. $error_record_type{$error_record_type}.
683 ' #'. $error_record_sequence_number. ' field #'. $error_data_field_number.
686 $response{result_code} = $response{batch_response_code};
687 $response{error_message} = $remainder;
699 Business::OnlinePayment::VirtualNet - Vital VirtualNet backend for Business::OnlinePayment
703 use Business::OnlinePayment;
705 my $tx = new Business::OnlinePayment("VirtualNet",
706 'merchant_id' => '999999999911',
708 'terminal' => '9911',
709 'mcc' => '5999', #merchant category code
710 'bin' => '999995', #acquirer BIN (Bank Identification Number)
711 'zip' => '543211420', #merchant zip (US) or assigned city code
713 'agent' => '000000', #agent bank
716 'merchant_name' => 'Internet Service Provider', #25 char max
717 'merchant_city' => 'Gloucester', #13 char max
718 'merchant_state' => 'VA', #2 char
720 'seq_file' => '/tmp/bop-virtualnet-sequence',
721 'batchnum_file' => '/tmp/bop-virtualnet-batchnum', # :/ 0-999 in 5 days
727 action => 'Authorization Only',
728 description => 'Business::OnlinePayment test',
730 invoice_number => '100100',
731 name => 'Tofu Beast',
732 card_number => '4111111111111111',
733 expiration => '09/03',
737 if( $tx->is_success() ) {
738 print "Card authorized successfully: ".$tx->authorization."\n";
740 print "Error: ".$tx->error_message."\n";
743 if( $tx->is_success() ) {
745 my $capture = new Business::OnlinePayment("VirtualNet",
747 'chain' => '000000', #optional?
750 'merchant_id' => '999999999911',
752 'terminal' => '9911',
753 'mcc' => '5999', #merchant category code
754 'bin' => '999995', #acquirer BIN (Bank Identification Number)
759 action => 'Post Authorization',
761 card_number => '4111111111111111',
762 expiration => '09/03',
763 authorization => $tx->authorization,
764 authorization_source_code => $tx->authorization_source_code,
765 returned_ACI => $tx->returned_ACI,
766 transaction_identifier => $tx->transaction_identifier,
767 validation_code => $tx->validation_code,
768 transaction_sequence_num => $tx->transaction_sequence_num,
769 #description => 'Business::OnlinePayment::BankOfAmerica visa test',
771 action => 'Post Authorization',
772 # order_number => $ordernum,
774 # authorization => $auth,
775 # description => 'Business::OnlinePayment::BankOfAmerica visa test',
780 if( $capture->is_success() ) {
781 print "Card captured successfully\n";
783 print "Error: ".$capture->error_message."\n";
790 For detailed information see L<Business::OnlinePayment>.
796 This module implements the interface documented at
797 http://www.vitalps.com/sections/int/int_Interfacespecs.html
799 Specifically, start with
800 http://www.vitalps.com/pdfs_specs/VirtualNet%020Specification%0200011.pdf
801 and then http://www.vitalps.com/pdfs_specs/EIS%0201080%020v6_4_1.pdf and
802 http://www.vitalps.com/pdfs_specs/EIS_1081_v_6_4.pdf and maybe even
803 http://www.vitalps.com/pdfs_specs/EIS%0201051.pdf and
804 http://www.vitalps.com/pdfs_specs/EIS%0201052.pdf
808 Ivan Kohler <ivan-virtualnet@420.am>
812 perl(1). L<Business::OnlinePayment>.