validate($payinfo)
or errorpage(gettext('invalid_card'));
- unless ( $payinfo =~ /^99\d{14}$/ ) { #token
+ unless ( $cust_main->tokenized($payinfo) ) { #token
my $cardtype = cardtype($payinfo);
errorpage("error saving info, payment not processed: $error")
if $error;
+
+ } elsif ( $payby eq 'CARD' ) { # not saving
+
+ $paymask = FS::payinfo_Mixin->mask_payinfo('CARD',$payinfo); # for untokenized but tokenizable payinfo
+
}
}