Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Apr 2008
    Posts
    351
    Plugin Contributions
    4

    Default Clear Credit Card Number and CVV Data

    DOWNLOADABLE VERSION HERE: http://www.zen-cart.com/index.php?ma...oducts_id=1634

    -------

    I was asked by a fellow zenner if I could show them how to clear out the credit card and cvv numbers from the orders table as they did not want to retain this information even though it was only the 1st and last 4 digits and the CVV was stored in a binary format.

    So, I decided to add this to the Admin - Tools - Store Manager page.

    In the file /admin/store_manager.php at or around line 36 (After // clean out the admin_activity_log section) add this:
    Code:
    // clear orders credit card info
        case 'clear_orders_cc_info':
          $db->Execute("update " . TABLE_ORDERS . " set cc_number = NULL, cc_cvv = NULL where cc_number > ' '");
          $db->Execute("optimize table " . TABLE_ORDERS);
          $messageStack->add_session(SUCCESS_CLEARED_CREDIT_CARD_INFO, 'success');
          unset($_SESSION['clear_orders_cc_info']);
          zen_redirect(zen_href_link(FILENAME_STORE_MANAGER));
        break;
    at or around line 473 after (<!-- eof: reset admin_activity_log --> add this:
    Code:
    <!-- bof: reset credit card and cvv numbers in orders -->
          <tr>
            <td colspan="2"><br /><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class=<?php echo ($_SESSION['reset_orders_cc_info_log'] == true ? "alert" : "main"); ?> align="left" valign="top"><?php echo TEXT_RESET_ORDERS_CC_INFO; ?></td>
                <td class="main" align="right" valign="middle"><?php echo '<a href="' . zen_href_link(FILENAME_STORE_MANAGER, 'action=clear_orders_cc_info') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
              </tr>
            </table></td>
          </tr>
    <!-- eof: reset credit card and cvv numbers in orders -->
    In the file /admin/includes/languages/english/store_manager.php add the following at or around line 20:
    Code:
    define('SUCCESS_CLEARED_CREDIT_CARD_INFO', '<strong>Successful</strong> Credit Card and CVV Numbers have been cleared from the orders table');
    At line 31 add the following:
    Code:
    define('TEXT_RESET_ORDERS_CC_INFO', '<strong>Reset Credit Card and CVV Numbers to Null in all Orders<br />WARNING: Be sure to backup your database before running this update!</strong><br>This will reset ALL credit card and cvv numbers to Null on all Orders. This is a 3rd party mod from JT of GTI Custom: ');
    You will now have a reset button that will permanently clear out the credit card and cvv numbers in your database but leave all other order info.
    I gave myself a shameless plug at the end of line 31, you can certainly remove it if you want to.

    Remember, Always BACKUP your files and DB before adding any modifications!

  2. #2
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Clear Credit Card Number and CVV Data

    Hi JT,

    Perfect, this worked like a charm, u r a genius

    Thank you once more for all your help, couldn't have done it without you!!!

    That way, I can easily reset all the CC info as orders are charged, as there is No need to keep those info anywhere after that.

    Cheerz mate

    P.s: I use WinSyntax to edit PHP files, however many times it spreads the lines apart and finding the correct line number is difficult, what simple/easy program do you use?
    I also use windows notepad, but sometimes it wrapps all the text together!!

  3. #3
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Clear Credit Card Number and CVV Data

    JTheed, that would make a VERY nice contribution if you would pack it up and upload it to the downloads.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  4. #4
    Join Date
    Apr 2008
    Posts
    351
    Plugin Contributions
    4

    Default Re: Clear Credit Card Number and CVV Data

    Quote Originally Posted by Get Em Fast View Post
    JTheed, that would make a VERY nice contribution if you would pack it up and upload it to the downloads.
    Sure, I can do that! I'll document it like above and include the modified files so people will have a choice as to which way they want to install it.

  5. #5
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Clear Credit Card Number and CVV Data

    Excellent! Let us know when it's available for download, won't you?????
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  6. #6
    Join Date
    Apr 2008
    Posts
    351
    Plugin Contributions
    4

    Default Re: Clear Credit Card Number and CVV Data

    Quote Originally Posted by rlexyd View Post
    Hi JT,

    Perfect, this worked like a charm, u r a genius

    Thank you once more for all your help, couldn't have done it without you!!!

    That way, I can easily reset all the CC info as orders are charged, as there is No need to keep those info anywhere after that.

    Cheerz mate

    P.s: I use WinSyntax to edit PHP files, however many times it spreads the lines apart and finding the correct line number is difficult, what simple/easy program do you use?
    I also use windows notepad, but sometimes it wrapps all the text together!!

    Glad I was able to help you out.

    Counter P.S: I use Komodo Edit 5 by ActiveState and Beyond Compare 3 to compare folders and files.
    Komodo has a Free version and Beyond Compare was purchased.

  7. #7
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    458
    Plugin Contributions
    1

    Default Re: Clear Credit Card Number and CVV Data

    Hi JT,

    Will the Reset CC info & CVV instructions also work on older versions of Zen-Cart, such as 1.3.6, 1.3.7?

    Thank you.

    Best Regards,

  8. #8
    Join Date
    Apr 2008
    Posts
    351
    Plugin Contributions
    4

    Default Re: Clear Credit Card Number and CVV Data

    Quote Originally Posted by rlexyd View Post
    Hi JT,

    Will the Reset CC info & CVV instructions also work on older versions of Zen-Cart, such as 1.3.6, 1.3.7?

    Thank you.

    Best Regards,
    I started with Zen-Cart 1.3.8 so I have no experience with the earlier versions, but as long as the data is in the same place and has the same names, it should work fine.
    If you have the means to backup your database, then try it.

  9. #9
    Join Date
    Apr 2008
    Posts
    351
    Plugin Contributions
    4

    Default Re: Clear Credit Card Number and CVV Data

    Quote Originally Posted by Get Em Fast View Post
    Excellent! Let us know when it's available for download, won't you?????
    It has been uploaded, so just waiting for it to be released.

  10. #10
    Join Date
    Jul 2007
    Posts
    155
    Plugin Contributions
    0

    help question Only prior version?

    Quote Originally Posted by JTheed View Post
    I was asked by a fellow zenner if I could show them how to clear out the credit card and cvv numbers from the orders table as they did not want to retain this information even though it was only the 1st and last 4 digits and the CVV was stored in a binary format.
    ----
    I assume this applies ONLY to the immediate past version of ZEN and not to the new release?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. If we cannot collect Credit Card CVV number why they there
    By rich00693 in forum Installing on a Windows Server
    Replies: 2
    Last Post: 11 May 2009, 10:28 PM
  2. Credit Card CVV Number Storage
    By PAE2008 in forum Customization from the Admin
    Replies: 2
    Last Post: 25 Jul 2008, 04:14 PM
  3. Credit Card and CVV # display
    By Shine in forum Managing Customers and Orders
    Replies: 0
    Last Post: 27 Jun 2006, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg