From: Mark Wells Date: Tue, 19 Jul 2016 19:56:06 +0000 (-0700) Subject: unreverse the check for tokenized payinfo, #71291 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8c72aca69588468b2e5b35397e4d6fb3d543155e unreverse the check for tokenized payinfo, #71291 --- diff --git a/FS/FS/cust_payby.pm b/FS/FS/cust_payby.pm index facb9c8d8..e4a1d193c 100644 --- a/FS/FS/cust_payby.pm +++ b/FS/FS/cust_payby.pm @@ -354,7 +354,7 @@ sub check { or return gettext('invalid_card'); # . ": ". $self->payinfo; my $cardtype = cardtype($payinfo); - $cardtype = 'Tokenized' if $self->payinfo !~ /^99\d{14}$/; #token + $cardtype = 'Tokenized' if $self->payinfo =~ /^99\d{14}$/; #token return gettext('unknown_card_type') if $cardtype eq "Unknown"; diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm index a61125e54..4f26e8c6f 100644 --- a/FS/FS/payinfo_Mixin.pm +++ b/FS/FS/payinfo_Mixin.pm @@ -197,7 +197,7 @@ sub payinfo_check { my $payinfo = $self->payinfo; my $cardtype = cardtype($payinfo); - $cardtype = 'Tokenized' if $payinfo !~ /^99\d{14}$/; + $cardtype = 'Tokenized' if $payinfo =~ /^99\d{14}$/; $self->set('paycardtype', $cardtype); if ( $ignore_masked_payinfo and $self->mask_payinfo eq $self->payinfo ) {