diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-02-24 20:53:53 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-24 20:53:53 -0800 |
commit | c901bfbd9114865ce0c6fd76c6378e534c3616d5 (patch) | |
tree | 7245d73bde51aaf380f6b3a27ec7909b4e54f2f0 /FS/FS/cust_payby.pm | |
parent | 59fe7dfd7fa6d31c30f3458af05510041ba529e0 (diff) |
banned card hashing rewrite, RT#32290, RT#23741
Diffstat (limited to 'FS/FS/cust_payby.pm')
-rw-r--r-- | FS/FS/cust_payby.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/FS/FS/cust_payby.pm b/FS/FS/cust_payby.pm index b1a7ddb..9feaf14 100644 --- a/FS/FS/cust_payby.pm +++ b/FS/FS/cust_payby.pm @@ -2,6 +2,7 @@ package FS::cust_payby; use base qw( FS::payinfo_Mixin FS::cust_main_Mixin FS::Record ); use strict; +use Digest::SHA qw( sha512_base64 ); use Business::CreditCard qw( validate cardtype ); use FS::UID qw( dbh ); use FS::Msgcat qw( gettext ); @@ -499,6 +500,14 @@ sub _banned_pay_hashref { }; } +sub _new_banned_pay_hashref { + my $self = shift; + my $hr = $self->_banned_pay_hashref; + $hr->{payinfo_hash} = 'SHA512'; + $hr->{payinfo} = sha512_base64($hr->{payinfo}); + $hr; +} + =item paydate_mon_year Returns a two element list consisting of the paydate month and year. |