1
First verify that your PHP has mcrypt installed. Check the output of for the string mcrypt.
2
Modify the orders table. (Just Change Type of 'cc_number' field)
Query: ALTER TABLE `oscommerce`.`orders` MODIFY COLUMN `cc_number` TINYTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
3
catalog/checkout_process.php
After (approximately line #13)
include('includes/application_top.php');
Add
require(DIR_WS_FUNCTIONS . 'cc_crypt.php');
After (approx line #70
$order_totals = $order_total_modules->process();
Add
$cc_number_crypt = base64_encode(cc_encrypt($order->info['cc_number'], CCKEY));
Find (approx line #93)
'cc_number' => $order->info['cc_number'],
Replace with
'cc_number' => $cc_number_crypt,
4
catalog/admin/include/classes/order.php
After (approx line #27
$order = tep_db_fetch_array($order_query);
Add
$cc_number_decrypt = cc_decrypt(base64_decode($order['cc_number']), CCKEY);
Find (approx line #42)
'cc_number' => $order['cc_number'],
Replace with
'cc_number' => $cc_number_decrypt,
5
catalog/includes/configure.php
Add (before the final ?> at the end of the file)
define('CCKEY', "YOUR_SECRET_KEY_HERE");
catalog/admin/includes/configure.php
Add (before the final ?> at the end of the file)
define('CCKEY', "YOUR_SECRET_KEY_HERE");
6
catalog/admin/orders.php
After (approximately line #13)
include('includes/application_top.php');
Add
require(DIR_WS_FUNCTIONS . 'cc_crypt.php');
7
Create File name it as 'cc_crypt.php'.Copy it to the following location.
catalog/includes/functions/cc_crypt.php
catalog/admin/includes/functions/cc_crypt.php
**** Use it at your own risk. ****
Saturday, September 13, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment