PDA

View Full Version : 2 way encryption using php - How?



Morgenmuffel
31-10-2005, 10:57 AM
OK basic scenario

client wants to accept credi card payments,

bank won't let them use a payment gateway, as they are new clients ( :mad: )

So CC processing is being done manually offline

I have set it up so that the when a customer enters their Credit card number on the site, it is split in 2
half is emailed to my client
and the other half is stored in a database

This is all done on a secure server

but i feel uncomfortable with this,

i would prefer the number to be encrypted, is there an easy way to do this, that will be easy for my client to unencrypt, as they are at the surfer/banker level of computer use

vinref
31-10-2005, 01:41 PM
A basic treatment using GPG (the GNU version of PGP) is given here (http://www.zend.com/zend/tut/tutorial-brogdon.php). Make sure you delete the unencrypted content immediately after encrypting.

It is like any command you call (I am assuming you are using a *nix?) to act on any variables. You then send the encrypted result by email. Make sure you read up about GPG and key maintenance.

vinref
31-10-2005, 01:55 PM
Oh, forgot to mention the decrypting end - you will need to teach your client to decrypt the encrypted email. It is fairly simple, and there are numerous apps and ways to do it. What OS and email client does your client use?

Thunderbird has an encrypt/decrypt plugin called Enigmail (http://enigmail.mozdev.org/download.html).

Morgenmuffel
31-10-2005, 05:27 PM
Client uses XP and outlook I am fairly sure

I had actually had a read of that page earlier

But it looked a shade more difficult than i had realised, especially the client end

Strommer
31-10-2005, 10:09 PM
How about using a fax, or the one that comes with WinXP ?

vapo
31-10-2005, 10:59 PM
http://www.hudzilla.org/phpbook/read.php/17_3_0

Should help you out Nigel. Good site that is. I want the book.