freeside/FS/FS cust_main.pm,1.149,1.150 cust_pay.pm,1.26,1.27 cust_refund.pm,1.21,1.22

ivan ivan at pouncequick.420.am
Mon Apr 19 17:58:07 PDT 2004


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv14199/FS/FS

Modified Files:
	cust_main.pm cust_pay.pm cust_refund.pm 
Log Message:
add methods for masking credit cards, add payment info modification to self-service

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- cust_main.pm	30 Mar 2004 16:43:52 -0000	1.149
+++ cust_main.pm	20 Apr 2004 00:58:04 -0000	1.150
@@ -2151,6 +2151,19 @@
   }
 }
 
+=item payinfo_masked
+
+Returns a "masked" payinfo field with all but the last four characters replaced
+by 'x'es.  Useful for displaying credit cards.
+
+=cut
+
+sub payinfo_masked {
+  my $self = shift;
+  my $payinfo = $self->payinfo;
+  'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4));
+}
+
 =item invoicing_list [ ARRAYREF ]
 
 If an arguement is given, sets these email addresses as invoice recipients
@@ -2843,6 +2856,8 @@
 card types.
 
 No multiple currency support (probably a larger project than just this module).
+
+payinfo_masked false laziness with cust_pay.pm and cust_refund.pm
 
 =head1 SEE ALSO
 

Index: cust_refund.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_refund.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cust_refund.pm	5 Aug 2003 00:20:42 -0000	1.21
+++ cust_refund.pm	20 Apr 2004 00:58:04 -0000	1.22
@@ -263,15 +263,27 @@
   $self->SUPER::check;
 }
 
-=back
+=item payinfo_masked
 
-=head1 VERSION
+Returns a "masked" payinfo field with all but the last four characters replaced
+by 'x'es.  Useful for displaying credit cards.
+
+=cut
+
+
+sub payinfo_masked {
+  my $self = shift;
+  my $payinfo = $self->payinfo;
+  'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4));
+}
 
-$Id$
+
+=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
 

Index: cust_pay.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cust_pay.pm	10 Sep 2003 10:54:46 -0000	1.26
+++ cust_pay.pm	20 Apr 2004 00:58:04 -0000	1.27
@@ -396,16 +396,25 @@
   qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
 }
 
+=item payinfo_masked
 
-=back
+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$
+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_refund.pm
 
 =head1 SEE ALSO
 




More information about the freeside-commits mailing list