-quiet "$Business::OnlinePayment::VirtualNet::DEBUG used only once"
authorivan <ivan>
Tue, 10 Sep 2002 05:33:18 +0000 (05:33 +0000)
committerivan <ivan>
Tue, 10 Sep 2002 05:33:18 +0000 (05:33 +0000)
         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

Changes
VirtualNet.pm
t/bad_auth.t
t/credit_card.t
t/credit_card2.t
t/credit_card3.t

diff --git a/Changes b/Changes
index 007c411..e4848bd 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,4 +1,11 @@
 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
index 016a525..3344f45 100644 (file)
@@ -16,7 +16,7 @@ require Exporter;
 @ISA = qw(Exporter AutoLoader Business::OnlinePayment);
 @EXPORT = qw();
 @EXPORT_OK = qw();
-$VERSION = '0.01';
+$VERSION = '0.02';
 
 $DEBUG ||= 0;
 
@@ -339,12 +339,17 @@ sub eis1080_response {
   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) ).
@@ -548,7 +553,11 @@ sub eis1081_request {
   $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);
index 9dbde52..04e25a2 100644 (file)
@@ -4,6 +4,7 @@ use Business::OnlinePayment;
 
 $DEBUG = 0;
 $Business::OnlinePayment::VirtualNet::DEBUG = $DEBUG;
+$Business::OnlinePayment::VirtualNet::DEBUG += 0; #quiet warnings with old perl
 
 #     Use this merchant information for testing only. 
 #  
index e766aab..ae7a1d0 100644 (file)
@@ -4,6 +4,7 @@ use Business::OnlinePayment;
 
 $DEBUG = 0;
 $Business::OnlinePayment::VirtualNet::DEBUG = $DEBUG;
+$Business::OnlinePayment::VirtualNet::DEBUG += 0; #quiet warnings with old perl
 
 #     Use this merchant information for testing only. 
 #  
index 8e591e6..8de3ece 100644 (file)
@@ -4,6 +4,7 @@ use Business::OnlinePayment;
 
 $DEBUG = 0;
 $Business::OnlinePayment::VirtualNet::DEBUG = $DEBUG;
+$Business::OnlinePayment::VirtualNet::DEBUG += 0; #quiet warnings with old perl
 
 #     Use this merchant information for testing only. 
 #  
index 2c351f4..92df9fd 100644 (file)
@@ -4,6 +4,7 @@ use Business::OnlinePayment;
 
 $DEBUG = 0;
 $Business::OnlinePayment::VirtualNet::DEBUG = $DEBUG;
+$Business::OnlinePayment::VirtualNet::DEBUG += 0; #quiet warnings with old perl
 
 #     Use this merchant information for testing only. 
 #