fixed silly bug with expiration dates
[Business-OnlinePayment-Network1Financial.git] / Network1Financial.pm
index 343c624..cd2b77c 100644 (file)
@@ -13,7 +13,7 @@ require Exporter;
 @ISA = qw(Exporter AutoLoader Business::OnlinePayment);
 @EXPORT = qw();
 @EXPORT_OK = qw();
-$VERSION = '0.01';
+$VERSION = '0.02';
 
 $DEBUG = 0;
 
@@ -123,7 +123,11 @@ sub submit {
       croak "$type not (yet) supported";
     }
 
-    ( my $exp = $content{'expiration'} ) =~ s/\///;
+    $content{'expiration'} =~ /^(\d+)\/(\d+)$/;
+    my($m, $y) = ($1, $2);
+    $m = $m+0;
+    $m = "0$m" if $m<10;
+    my $exp = "$m$y";
 
     $self->revmap_fields(
         'M_id'              => 'login',