Just don't do it. Ask yourself a couple questions...
- Are you going to store the encrypted credit card information and the scripts to decrypt it on the same server?
- If yes, don't you realize that if the server is hacked, your information might as well not be encrypted?
If you are dealing with peoples credit card data, you have a responsibility to handle it as securely as possible. In my opinion, this means that if credit card data needs to be retained (and it really only should be for recurring payments), it needs to be housed on a server that is not normally connected to the network. Said server should only connect when necessary, and even then strict controls should be in place.
Think this all sounds over the top? You won't when your server gets hacked and 10,000 customers have their credit cards stolen.
Check out this older slashdot discussion on the topic:
http://slashdot.org/article.pl?sid=01/12/25/0657209&mode=thread
Matt Wade
codewalkers.com