don't die when we do not know how to perform the transaction
authorjeff <jeff>
Thu, 21 Jun 2007 19:25:50 +0000 (19:25 +0000)
committerjeff <jeff>
Thu, 21 Jun 2007 19:25:50 +0000 (19:25 +0000)
TransFirsteLink.pm

index 6bcbfab..8edf2dd 100644 (file)
@@ -7,7 +7,7 @@ use Tie::IxHash;
 
 use base qw(Business::OnlinePayment::HTTPS);
 
-$VERSION = '0.03';
+$VERSION = '0.04';
 $VERSION = eval $VERSION;
 $DEBUG   = 0;
 
@@ -375,8 +375,12 @@ sub submit {
 
     my $type_action = $self->transaction_type(). '_'. $content{TransactionCode};
     unless ( exists($required{$type_action}) ) {
-        croak( "TransFirst eLink can't (yet?) handle transaction type: ".
-              "$content{action} on " . $self->transaction_type() );
+#        croak( "TransFirst eLink can't (yet?) handle transaction type: ".
+#              "$content{action} on " . $self->transaction_type() );
+      $self->error_message("TransFirst eLink can't handle transaction type: ".
+        "$content{action} on " . $self->transaction_type() );
+      $self->is_success(0);
+      return;
     }
 
     my $expdate_mmyy = $self->expdate_mmyy( $content{"expiration"} );