|
Credit Card Storage and Security:
I've been working on a billing manager for a new online business. It is a subscription service which would require monthly billing.
I've been working with PHP's mcrypt library. I could store the cc# in my web database encrypted, but then the question is where do I store the key?
There are 2 points where the encryption/decryption would happen. 1. when the customer signs up for the first time and the cc# is encrypted and put in the database. 2. when the monthly invoice is processed.
I can think of ways to accomplish this if I were willing to do things manually, but I really want to automate the process.
Nothing is un-hackable, but I can certainly try to make it more difficult. The best solution so far is to store the cc processing script on a different server with the key. This server could sit behind a firewall and just run a daily cron to process the payments. It would still have to communicate with the web database, but at least the key would be off the web server.
The problem with that is how do I encrypt the credit card initially when they sign up? Maybe that will be the only manual process. I could store half of the credit card on the web database, and have the other half emailed to me. Once I get the order, I can encrypt the card # manually and update the web database with the customer records.
Any thoughts on this?
__________________
Mike
|