Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

GPG Credit Card Encryption - how do I decrypt the email?


Recommended Posts

I've just been trying to get this mod to work...I'm completely new to gpg etc ( or I was when I started work on it tonight...I need to be an expert on it on Monday :cry: )


basically AFAIK, I've installed ccgpg 0.94, and ensured the paths are correct, and made sure that my pubring is in home/temp, which has 777 permissions, etc etc etc


BUT :shock:


When I get the "Extra Order Info" email, it's blank. nada. empty as my brain feels right now.


any ideas???

Link to comment
Share on other sites

  • 6 months later...

Does anyone have a successfull email decryption with this contrib? I am also getting empty emails returned and have tried all in this forum with no avail. PLease help.



Link to comment
Share on other sites

  • 1 month later...

I'm also having difficulties making the GPG Credit Card Encryption (http://www.oscommerce.com/community/contributions,611) contribution to work. The last two posts on that contribution don't have the ccgpg.php that goes into the includes/languages/english/modules/payment. I found the file in v.93.


I deleted the cc.php module, thus I only have the gpg.php module to deal with it. I installed the gpg.php files in their respective locations includes/modules/payment and includes/languages/english/modules/payment. Changed the paths so they point to the location of my temp file, encryption key, and pgp. I created the public and private keys on the Cpanel and imported them into my WinPT. My .gnupg folder and files inside of it have full persmissions while testing. But when I run transactions only receive blank emails with a subject line of "Extra Order Info encrypt a". I followed the sugestions in the GPG_CPanel_setup and commented the lines unlink($plainTxt); and unlink($crypted); therefore I can see the credit cards being written to my temp file. I just can't figure out how to make them come across encrypted. I appreciate any advise on this issue. Here's the code where I set the paths to the gpg.php script.


function after_process() {

global $HTTP_POST_VARS, $insert_id;


$message = 'Order #' . $insert_id . "\n\n" . 'Number: ' . $this->cc_complete . "\n\n";

$tmpToken = md5(uniqid(rand()));

$plainTxt = "/home/username/temp/" . "$tmpToken" . "anca";

$crypted = "/home/username/temp/" . "$tmpToken" . "anca.asc";

$gpghome="/home/username"; ///temp /.gnupg where is your pubring? That dir has to have write access.

$gpgpath="/usr/bin/gpg"; //where is the executable

$gpgrecipient="info (info) <info@domainame.com>"; //the key used for encryption

$fp = fopen($plainTxt, "a+");

fputs($fp, $message);


system("export HOME=".$gpghome.";".$gpgpath." --verbose --verbose -r '".$gpgrecipient."' --encrypt -a -z 0 ".$plainTxt." ");

$fd = fopen($crypted, "r");

$message = fread($fd, filesize($crypted));



tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'Extra Order Info encrypt a' , $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');


Link to comment
Share on other sites

  • 10 months later...
Can this contribution be modified for use with PGP?

Use this one... http://www.oscommerce.com/community/contri...,all/search,gpg


We had it re programmed and it works great now! And to answer your question... YES, it works with PGP or the opensource version as well.

We hired Jason Medland to complete that job for our client and it has been usede several times since.


Rick Lawrence




Link to comment
Share on other sites

Thanks for reply


I downloaded the contribution and read over the documentation..




What about the credit card info in database?


Does this encrypt the credit card info in the database?


Does the credit card number still show in the admin panel customer order details?


Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...