X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_refund.pm;h=d60c010610911ffbafda66e3cd540080dc6ba7c8;hb=b563ce9b834e4b8c3b2f0508f6c528d8b881e08d;hp=aac320e6173b1df50e1ee2e3e2b806e395ffa83d;hpb=eb9d5b215af1fbe867b75c12328126f650f9fb06;p=freeside.git diff --git a/FS/FS/cust_refund.pm b/FS/FS/cust_refund.pm index aac320e61..d60c01061 100644 --- a/FS/FS/cust_refund.pm +++ b/FS/FS/cust_refund.pm @@ -48,7 +48,7 @@ inherits from FS::Record. The following fields are currently supported: L and L for conversion functions. =item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH), -`BILL' (billing), or `COMP' (free) +`LECB' (Phone bill billing), `BILL' (billing), or `COMP' (free) =item payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username) @@ -235,7 +235,7 @@ sub check { unless $self->crednum || qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); - $self->payby =~ /^(CARD|CHEK|BILL|COMP)$/ or return "Illegal payby"; + $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP)$/ or return "Illegal payby"; $self->payby($1); #false laziness with cust_pay::check @@ -260,18 +260,30 @@ sub check { $self->otaker(getotaker); - ''; #no error + $self->SUPER::check; } -=back +=item payinfo_masked + +Returns a "masked" payinfo field with all but the last four characters replaced +by 'x'es. Useful for displaying credit cards. -=head1 VERSION +=cut -$Id: cust_refund.pm,v 1.19 2002-10-12 10:15:55 ivan Exp $ + +sub payinfo_masked { + my $self = shift; + my $payinfo = $self->payinfo; + 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); +} + + +=back =head1 BUGS -Delete and replace methods. +Delete and replace methods. payinfo_masked false laziness with cust_main.pm +and cust_pay.pm =head1 SEE ALSO