diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-12-28 14:18:29 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-12-28 14:18:29 -0600 |
commit | 691b4de7c0a7d0e39bebe2ea7fadea5fb21b1539 (patch) | |
tree | ec486c00517954c0d37ae1ece07d2de790b306df /FS/FS/cust_main.pm | |
parent | f26f4658d8e2a48439ca4f912dbc887cd008ee5b (diff) | |
parent | b6151684a227ad8018de4fdc661fcb61d00675a7 (diff) |
71513: Card tokenization [project branch merge]
Diffstat (limited to 'FS/FS/cust_main.pm')
-rw-r--r-- | FS/FS/cust_main.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 2147ce1..4bd3f26 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2128,7 +2128,7 @@ sub check_payinfo_cardtype { 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); @@ -4679,6 +4679,10 @@ CHEK only CHEK only +=item saved_cust_payby + +scalar reference, for returning saved object + =back =cut @@ -4875,6 +4879,9 @@ PAYBYLOOP: return $error; } + ${$opt{'saved_cust_payby'}} = $new + if $opt{'saved_cust_payby'}; + $dbh->commit or die $dbh->errstr if $oldAutoCommit; ''; @@ -5838,6 +5845,8 @@ sub queueable_upgrade { 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 |