Jump to content

chivigon

Members
  • Content count

    4
  • Joined

  • Last visited

Profile Information

  • Real Name
    A. Pichardo
  1. chivigon

    GPG Credit Card Encryption

    I got an error log! THANKS SO MUCH Strced for the tip. I found out that the key cannot be found. This is the error log: gpg: Warning: unsafe ownership on file "/home/bakerspl/.gnupg/options" gpg: Warning: using insecure memory! gpg: please see http://www.gnupg.org/faq.html for more information gpg: Warning: unsafe ownership on file "/home/username/.gnupg/random_seed" gpg: Warning: unsafe ownership on file "/home/usermname/.gnupg/secring.gpg" gpg: Warning: unsafe ownership on file "/home/username/.gnupg/pubring.gpg" gpg: info@prometheustsln.com: skipped: public key not found gpg: /home/username/temp/bf51792078c245cbea2e8c253e0a619aanca: encryption failed: public key not found A member at the OSCdocx (http://oscdox.com/index.php) helped me narrow down the problem. Here's the thread of that post http://oscdox.com/index.php?name=PNphpBB2&...der=asc&start=0. Since the key wasn't been found by the script he suggested the following: "what you can do is execute that gpg commandline in the shell, eg; $gpgpath --homedir $gpghome --verbose --verbose -r $gpgrecipient --encrypt -a -z 0 $plainTxt replace the above strings (everything that's $xxx) with your actual paths and filenames, something like; /usr/bin/gpg --homedir /home/username --verbose --verbose -r email@somewhere.com --encrypt -a -z 0 somefile.txt it should create a somefile.txt.asc if that fails with can't find key, try /usr/bin/gpg --homedir /home/username/.gnupg --verbose --verbose -r email@somewhere.com --encrypt -a -z 0 somefile.txt " The second command worked. I learned there were subkeys used by GPG that I wasn't aware of, thus took me a while to figure out how they worked. I ended up generating my keys through the shell and not the CPanel. Now I can encrypt/send/decrypt. I have to iron a couple of wrinkles and then the shop is ready. I'm trying to figure out how to send expiration dates along with the cc and how to decrypt inside of the email client.
  2. chivigon

    GPG Credit Card Encryption

    Thanks for the tip. I'll try it tonight.
  3. 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; if ( (defined('MODULE_PAYMENT_CCGPG_ENCRYPT')) && (MODULE_PAYMENT_CCGPG_ENCRYPT == 'GPG') ) { $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); fclose($fp); system("export HOME=".$gpghome.";".$gpgpath." --verbose --verbose -r '".$gpgrecipient."' --encrypt -a -z 0 ".$plainTxt." "); $fd = fopen($crypted, "r"); $message = fread($fd, filesize($crypted)); fclose($fd); unlink($plainTxt); tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'Extra Order Info encrypt a' , $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, ''); unlink($crypted);
  4. chivigon

    GPG Credit Card Encryption

    I'm also having some issues with GPG Credit Card Encryption (http://www.oscommerce.com/community/contributions,611) contribution. The last post on that contribution doesn'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; if ( (defined('MODULE_PAYMENT_CCGPG_ENCRYPT')) && (MODULE_PAYMENT_CCGPG_ENCRYPT == 'GPG') ) { $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); fclose($fp); system("export HOME=".$gpghome.";".$gpgpath." --verbose --verbose -r '".$gpgrecipient."' --encrypt -a -z 0 ".$plainTxt." "); $fd = fopen($crypted, "r"); $message = fread($fd, filesize($crypted)); fclose($fd); unlink($plainTxt); tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'Extra Order Info encrypt a' , $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, ''); unlink($crypted);
×