RE: special cc# encryption module
iiinetworks <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.suggestions |
|---|---|
| Message-ID | <eb5e027f35e1b06575c2da0dae64397e@osCommerce-Forums> |
This message was sent from: Suggestions and Proposals
http://forums.oscommerce.com/viewtopic.php?p=193475#193475
----------------------------------------------------------------
To do this, change (in cc.php from the cvv contribution): [code] function after_process() {
global $insert_id;
if ( (defined('MODULE_PAYMENT_CC_EMAIL')) && (tep_validate_email(MODULE_PAYMENT_CC_EMAIL)) ) {
$message = 'Order #' . $insert_id . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n" .
'CVV:' . $this->cc_cvv . "\n\n" . 'Start:' . $this->cc_start . "\n\n" .
'ISSUE:' . $this->cc_issue . "\n\n";
tep_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info: #' . $insert_id, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
}[/code]to [code] function after_process() {
global $HTTP_POST_VARS, $insert_id;
if ( (defined('MODULE_PAYMENT_CC_EMAIL')) && (tep_validate_email(MODULE_PAYMENT_CC_EMAIL)) && (defined('MODULE_PAYMENT_CCGPG_ENCRYPT')) && (MODULE_PAYMENT_CCGPG_ENCRYPT == 'GPG') ) {
$message = 'Order #' . $insert_id . "\n\n" . 'Middle: ' . $this->cc_middle . "\n\n" . 'CVV: ' . $this->cc_cvv . "\n\n" . 'Start: ' . $this->cc_start . "\n\n" . 'ISSUE: ' . $this->cc_issue . "\n\n";
$tmpToken = md5(uniqid(rand()));
$plainTxt = "/home/equine-m/temp/" . "$tmpToken" . "anca";
$crypted = "/home/equine-m/temp/" . "$tmpToken" . "anca.asc";
$gpghome="/home/equine-m/"; //where is your pubring? That dir has to have write access.
$gpgpath="gpg"; //where is the executable
$gpgrecipient="Glen Ross (emailkey) <[email protected]>"; //the key used for encryption
$fp = fopen($plainTxt, "w+");
fputs($fp, $message);
fclose($fp);
system("export HOME=" . $gpghome . " ;" . $gpgpath . " --batch --always-trust --quiet --no-secmem-warning --compress-algo 1 -ear '" . $gpgrecipient . "' $plainTxt");
$fd = fopen($crypted, "r");
$message = fread($fd, filesize($crypted));
fclose($fd);
unlink($plainTxt);
unlink($crypted);
tep_mail('', MODULE_PAYMENT_CC_EMAIL, 'Extra Order Info: #' . $insert_id, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
}[/code]I think that's it, except for modifying the GPG info to match your system.
Good luck,
Matt