my $payinfo = $self->payinfo;
$payinfo =~ s/\D//g;
- return '' if $payinfo =~ /^99\d{14}$/; #token
+ return '' if $self->tokenized($payinfo); #token
my %bop_card_types = map { $_=>1 } values %{ card_types() };
my $cardtype = cardtype($payinfo);
CHEK only
+=item saved_cust_payby
+
+scalar reference, for returning saved object
+
=back
=cut
return $error;
}
+ ${$opt{'saved_cust_payby'}} = $new
+ if $opt{'saved_cust_payby'};
+
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
'';
# window for possible conflict is practically nonexistant,
# but just in case...
$record = $record->select_for_update;
+ if (!$record->custnum && $table eq 'cust_pay_pending') {
+ $record->set('custnum_pending',1);
+ }
my $error = $record->replace;
die $error if $error;
}
FS::upgrade_journal->set_done('encryption_check');
}
+ # now that everything's encrypted, tokenize...
+ FS::cust_main::Billing_Realtime::token_check(@_);
}
# not entirely false laziness w/ Billing_Realtime::_token_check_next_recnum