Magento – Database Tables Containing Credit Card Information

databasemagento-1.7magento-1.8magento-1.9orders

I have a Magento 1 database that I want to remove sensitive data from before I allow a consultant to connect to.

What tables/rows would I need to fill with dummy data? I have looked at my tables with myPHPAdmin and wasn't able to find one containing credit card information. I read somewhere that not all versions of Magento store credit card information.

Once I find the tables/columns to change, I assume that what I need is something along the lines of:

UPDATE transactions SET creditCardNum = "4111111111111111"; 

Best Answer

What tables/rows do I need to fill with dummy data?


  1. "sales_flat_quote_payment"
  2. "sales_flat_order_payment"

These two tables stores credit card number based on payment method config


Note:

Magento 1.8.1 : Your cc are stored here sales_flat_order_payment


If your payment method hold this,

protected $_canSaveCc   = false;

then credit card information NOT save into database.

if you check Mage_Payment_Model_Method_Cc, you will notice there is a flag $_canSaveCc controls whether saving cc number, in saved cc its true, in most other payment class, this flag is false.

Dummy Query

UPDATE sales_flat_quote_payment
SET cc_number = '4111111111111111'
WHERE id = 1;
Related Topic