[freeside] cust_main.cgi and Credit Card Number Display
ivan
ivan at 420.am
Thu Jun 27 13:45:43 PDT 2002
On Thu, Jun 27, 2002 at 12:05:50PM -0400, Stephen D. Bechard wrote:
> This recommendation comes from the Accounting Department. :)
>
> Credit Cards are normally tracked and verified by the
> last 4 digits of not the first 4, so they wanted to see
> xxxxxxxxxxx8906 instead of 1234xxxxxxxxxxx
How about a reference? Failing that, how about confirmation from
other folks?
> They also informed me that not all Credit Card numbers have the
> same amount of digits, so I used the length of $payinfo to get
> the start and end points of sbstr. Seems to work okay.
>
> What do you think?
Aren't there a few other places you'd need to make this chane also?
> Here is the possible diff to change this:
>
> --- /CVS/freeside/httemplate/view/cust_main.cgi Thu Jun 27 11:30:52 2002
> +++ /acpdocs/view/cust_main.cgi Thu Jun 27 11:53:26 2002
> @@ -206,7 +206,7 @@
>
> if ( $cust_main->payby eq 'CARD' ) {
> my $payinfo = $cust_main->payinfo;
> - $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4);
> + $payinfo = 'x'x(length($payinfo)-4).
> substr($payinfo,(length($payinfo)-4),length($payinfo));
>
> print 'Credit card</TD></TR>',
> '<TR><TD ALIGN="right">Card number</TD><TD BGCOLOR="#ffffff">',
>
> Thanks,
> Steve
>
--
_ivan
More information about the freeside-users
mailing list