[ic] last four digits of the CC#

David Totten akopia@davetotten.com
Wed, 25 Apr 2001 16:12:51 -0400

On Wed, Apr 25, 2001 at 01:38:42PM -0600, Russ Mann wrote:
> Perhaps in the next release of IC we can have one more special variable:
>          mv_credit_card_l4       # contains the last 4 digits of the card
> number
> This, in conjunction with the card type and expiration date (which already
> stored in the userdb if checkout data is saved to an account), should be
> enough for both the admin and the customer to make a positive ID of the
> card online, without exposing the raw number.
> ---
> I implemented this in MV 3.14 a long time ago, and its very useful.  Any
> ideas/plans to integrate into the product?

I don't know if there are any plans to integrate it into interchange, but
you can do it fairly easily by adding code similiar to the following in the
$CATROOT/etc/profiles.order (under the checkout_profile section probably)

        my $ref = $CGI->{mv_credit_card_number};

        $ref =~ s/\D+//g;
                if($ref =~ /(.*)(\d\d\d\d)/ ) {
                   my $head = $1;
                   my $tail = $2;

                   $head =~ s/\d/X/g;
                   $ref = $head.$tail;
        $Values->{mv_credit_card_xref} = $ref;

then on your receipt page and email, you can get at it with 
[value mv_credit_card_xref]

David Totten

Start random buzzword text:
It should be noted that an enterprise java beans based solution must utilize an object-oriented paradigm to maximize the potential of the web based commerce solution.