X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_payby.pm;h=b9e79a2beb762ce94b66625567df52eeac796b3f;hb=768ab093771b3305a67c9d929b461ef777ecdad8;hp=b1a7ddb56b974880a43dc6d8a2045ad98cb9a9cc;hpb=799da5a4ff161203bbac930b75f3b934ccd19243;p=freeside.git diff --git a/FS/FS/cust_payby.pm b/FS/FS/cust_payby.pm index b1a7ddb56..b9e79a2be 100644 --- a/FS/FS/cust_payby.pm +++ b/FS/FS/cust_payby.pm @@ -2,6 +2,8 @@ package FS::cust_payby; use base qw( FS::payinfo_Mixin FS::cust_main_Mixin FS::Record ); use strict; +use Scalar::Util qw( blessed ); +use Digest::SHA qw( sha512_base64 ); use Business::CreditCard qw( validate cardtype ); use FS::UID qw( dbh ); use FS::Msgcat qw( gettext ); @@ -201,8 +203,7 @@ sub replace { ) ) { -warn $self->payinfo; -warn $old->payinfo; + $self->payinfo($old->payinfo); } elsif ( $self->payby =~ /^(CHEK|DCHK)$/ && $self->payinfo =~ /xx/ ) { @@ -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.