- unless ( $self->paycardtype ) {
-
- if ( $self->payby eq 'CARD' && $self->paymask =~ /^\d+x/ ) {
- # if we can't decrypt the card, at least detect the cardtype
- $self->set('paycardtype', cardtype($self->paymask));
- } else {
- $self->set('paycardtype', '');
- # return "paycardtype required ".
- # "(can't derive from a token and no paymask w/prefix provided)";
- }
-
+ if ( $self->payby eq 'CARD' && $self->paymask =~ /^\d+x/ ) {
+ # if we can't decrypt the card, at least detect the cardtype
+ $self->set('paycardtype', cardtype($self->paymask));
+ } else {
+ $self->set('paycardtype', '') unless $self->paycardtype;
+ # return "paycardtype required ".
+ # "(can't derive from a token and no paymask w/prefix provided)";