Revision history for Perl extension Business::OnlinePayment::VirtualNet
+0.02 unreleased
+ -quiet "$Business::OnlinePayment::VirtualNet::DEBUG used only once"
+ warnings in tests under old perls
+ -fix elusive "Error in Batch in Detail Record #0003 field #19" bug:
+ missing transactoin identifiers should default to zero-fill, not
+ space fill
+
0.01 Fri Jul 19 08:25:26 PDT 2002
-original version; created by ivan 1.0
@ISA = qw(Exporter AutoLoader Business::OnlinePayment);
@EXPORT = qw();
@EXPORT_OK = qw();
-$VERSION = '0.01';
+$VERSION = '0.02';
$DEBUG ||= 0;
my( $self, $response) = @_;
my %response;
- $response =~ /^$STX(.{67})([\w ]{0,15})$FS([\w ]{0,4})$FS.*$ETX(.)$/
+ #$response =~ /^$STX(.{67})([\w ]{0,15})$FS([\w ]{0,4})$FS.*$ETX(.)$/
+ $response =~ /^$STX(.{67})([\w ]{0,15})$FS([\w ]{0,4})$FS(\d{3})$ETX(.)$/
or die "can't decode (eis1080) response: $response\n". join(' ', map { sprintf("%x", unpack('C',$_)) } split('', $response) );
( $response{transaction_identifier},
$response{validation_code},
+ my $group3version,
my $lrc
- ) = ($2, $3, $4);
+ ) = ($2, $3, $4, $5);
+
+ die "group iii version $group3version ne 014"
+ unless $group3version eq '014';
warn "$response\n".
join(' ', map { sprintf("%x", unpack('C',$_)) } split('', $response) ).
$detail .= $param->{AVS_result_code};
# 62-76 15 A/N Transaction Identifier Left-Justified/Space-Filled 4.206
- $detail .= substr($param->{transaction_identifier}. (' 'x15), 0, 15);
+ my $transaction_identifier =
+ length($param->{transaction_identifier})
+ ? substr($param->{transaction_identifier}. (' 'x15), 0, 15)
+ : '000000000000000';
+ $detail .= $transaction_identifier;
# 77-80 4 A/N Validation Code 4.218
$detail .= substr($param->{validation_code}.' ', 0, 4);