Graveyard666 Posted December 13, 2005 Posted December 13, 2005 Hi, i am re-designing my site and right now I'm working on the account_history_info.php page and I made a spot to show the user how they paid for the item ie credit card, paypal. But I don't know how I can get it to display only the last 4 digits of the credit card # and have XXXXXX for the remainder of the number I searched the forum but didn't find an answer :( jeff
Guest Posted December 13, 2005 Posted December 13, 2005 does your database save only the last 4 digits? can't you just call that table and output via php and manually type XXXXXX like Credit Card: XXXXXX<?php echo $cc_field; ?>
Graveyard666 Posted December 13, 2005 Author Posted December 13, 2005 no, the entire CC number is stored in my db we do all CC processing manually in our store at the terminal instead of an online merchant
Guest Posted December 13, 2005 Posted December 13, 2005 you could try something like i asked about in this topic: http://www.oscommerce.com/forums/index.php?sho...5&hl=characters if that doesn't work (or poses a security concern) you can set oscommerce up to save x amount of digits to your database and the rest of the digits get sent to your email
♥Monika in Germany Posted December 13, 2005 Posted December 13, 2005 thanks eww, i'll check into it try this: str_repeat('X', (strlen($cc_field) - 4)) . substr($cc_field, -4) :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
Graveyard666 Posted December 13, 2005 Author Posted December 13, 2005 Monika, where?? here is my code for pulling the CC number (in account_history_info.php): <tr> <td class="main"><?php echo $order->info['cc_number']; ?></td> </tr>
♥Monika in Germany Posted December 14, 2005 Posted December 14, 2005 Monika, where?? here is my code for pulling the CC number (in account_history_info.php): <tr> <td class="main"><?php echo $order->info['cc_number']; ?></td> </tr> please try this: <tr> <td class="main"><?php echo str_repeat('X', (strlen($order->info['cc_number']) - 4)) . substr($order->info['cc_number'], -4); ?></td> </tr> :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
Graveyard666 Posted December 14, 2005 Author Posted December 14, 2005 please try this: <tr> <td class="main"><?php echo str_repeat('X', (strlen($order->info['cc_number']) - 4)) . substr($order->info['cc_number'], -4); ?></td> </tr> perfect Monika!! thanks much!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.