Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Code mod


clarocque

Recommended Posts

I am setting up a page for the sales department to remove the first 12 digits of a CC number so only the last four are stored in the database.

 

I have inserted a code that shows the full number so they can get it and now that it needs to be altered (which the can do by opening another page and manually removing it). The only code I could make whork shows all of the numbers (wll actually however many I set). But I would really like it show all X's except the last 4. Can anyone modify this code to do that?

 

 

 

<?php echo "" . substr($order->info['cc_number'],-16); ?>

 

 

 

Questino # 2 (not nearly as important as above) but how hard is it (or does anyone have a code- because I am code dumb) to be able to click a button and have it remove the first 12 digits of a CC number?

 

But like I said the first question is a priority if anyone can help.

 

Thanks

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Thanks, but I need it a little different...

 

I need it to only show the X if there is more than 4 numbers.

 

We get the CC # as 16 digits...

 

Then we get the number via SSL and then delete the first 12 numbers so that the database only references the last 4.

 

What I am looking to do is have the X only show if someone has not yet removed the first 12 characters.

 

I need it to convert the number and show me an X instead of a hard coded X

 

 

Is this possible?

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...