Remove Cc Info?


I know there is a way to remove cc info as the order is processed or manually. But I have a lot of old orders with the info in them. Is there a way to do it database wide?

Would require you to write/run a small script that will essentially:

get the data from cscart_order_data

decrypt/unserialize it

truncate the password to last 4

remove any CVV data

encrypt/serialize and store

Or use the function fn_cleanup_payment_info($order_id, $order_info['payment_info']).

Alternatively if you have the 'remove CC info' on a particular status set you could use a bach_status change to change the status from/to that status to get the system to do it for you. But I'd suggest doing the script. It would look something like (UNTESTED):

$order_start_date = '1/1/2000'; // starting date
$order_end_date = 'today';  // ending order_id
foreach(db_get_fields("SELECT order_id FROM ?:orders WHERE order_id >= ?i AND order_id <= ?i", 
      strtotime($order_start_date), strtotime($order_end_date)) as $order_id) {
  $p_data = dg_get_field("SELECT data FROM ?:order_data WHERE order_id=?i AND type='P'", $order_id);
 if( $p_data ) {
    fn_cleanup_payment_info($order_id, $p_data);

Thanks. I'll pass it on to my dev.