address standardization part one, finally checked in from here
[freeside.git] / FS / FS / payinfo_Mixin.pm
index 40b97a9..bdfe6c9 100644 (file)
@@ -230,9 +230,18 @@ sub payinfo_check {
       $self->payinfo('N/A'); #???
     }
   } else {
-    my $error = $self->ut_textn('payinfo');
-    return $error if $error;
+    if ( $self->is_encrypted($self->payinfo) ) {
+      #something better?  all it would cause is a decryption error anyway?
+      my $error = $self->ut_anything('payinfo');
+      return $error if $error;
+    } else {
+      my $error = $self->ut_textn('payinfo');
+      return $error if $error;
+    }
   }
+
+  '';
+
 }
 
 =head1 BUGS