I agree that php and mysql both offer their own encryption functions, however, I access the db from two languages php and c# and in order to ensure I am encrypting and decrypting the data in an identical way I need to ensure that I am using an identical method.
I use a desktop piece of software to sync sales orders with Sage Accounting etc, and the CC numbers are held in the MySQL database until the point of dispatch.
In the UK, it is the law that you may "Pre-Authorise" a card at the point of sale, however, you MUST NOT "Finalise" or "RELEASE" (from their account) the funds until point of dispatch.
HSBC require the authorisation number and the card number in order to do this. Whereas Barclays bank, only require the authorisation number.
In addition, we can store card numbers for regular customers and it would be very irresponsible to store them without encryption... What's more, a standard base64_encode() is pointless as it's so easy to decode,
Could someone tell me what base64_encode is actually for, with it having a decode function that does not relay on any key?