You misunderstood Padre and ZeRaW's answers.
What ZeRaW said is that hashing the credit card info will not allow you to retrieve it, but there are other encryption methods that do. I found
this tutorial on the net. It's a little dated, but will still give you enough to go.
What Padre said is that you do not want to encrypt using a static key. The cool thing about encryption is that you need a key to decrypt the data. But if this key is static (understand "a fixed string"), it will have to be stored somewhere on your website. That is considered a security threat, because when an attacker gets access to your website he can retrieve the key and get the info from the database. What you could do instead is use a "dynamic" key. For example, each user's credit card info will be encrypted using the hash of their password as a key. That way, since it is never the same key, your attacker will have the worst time ever trying to figure it out.
What rahmu will add to this conversation is that you don't need to store your user's credit card informations. I would never giv my credit card number that stores it on its database. No Way!! I cannot ever trust them. I would gladly enter the info every time I make a transaction.
If you want a more convenient way of payment, use PayPal.
(
I know it doesn't work in Lebanon, but that does not justify storing cc info in your database.)