freeside/httemplate/view cust_main.cgi,1.79,1.80
ivan
ivan at pouncequick.420.am
Mon Apr 19 17:58:08 PDT 2004
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv14199/httemplate/view
Modified Files:
cust_main.cgi
Log Message:
add methods for masking credit cards, add payment info modification to self-service
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main.cgi,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- cust_main.cgi 5 Apr 2004 11:55:35 -0000 1.79
+++ cust_main.cgi 20 Apr 2004 00:58:04 -0000 1.80
@@ -235,8 +235,7 @@
;
if ( $cust_main->payby eq 'CARD' || $cust_main->payby eq 'DCRD' ) {
- my $payinfo = $cust_main->payinfo;
- $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4));
+ my $payinfo = $cust_main->payinfo_masked;
print 'Credit card ',
( $cust_main->payby eq 'CARD' ? '(automatic)' : '(on-demand)' ),
'</TD></TR>',
@@ -601,11 +600,11 @@
foreach my $cust_pay ($cust_main->cust_pay) {
my $payby = $cust_pay->payby;
- my $payinfo = $cust_pay->payinfo;
+ my $payinfo = $payby eq 'CARD'
+ ? $cust_pay->payinfo_masked
+ : $cust_pay->payinfo;
my @cust_bill_pay = $cust_pay->cust_bill_pay;
- $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4))
- if $payby eq 'CARD';
my $target = "$payby$payinfo";
$payby =~ s/^BILL$/Check #/ if $payinfo;
$payby =~ s/^BILL$//;
@@ -751,10 +750,10 @@
foreach my $cust_refund ($cust_main->cust_refund) {
my $payby = $cust_refund->payby;
- my $payinfo = $cust_refund->payinfo;
+ my $payinfo = $payby eq 'CARD'
+ ? $cust_refund->payinfo_masked
+ : $cust_refund->payinfo;
- $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4))
- if $payby eq 'CARD';
$payby =~ s/^BILL$/Check #/ if $payinfo;
$payby =~ s/^(CARD|COMP)$/$1 /;
More information about the freeside-commits
mailing list