How to add CVV2 in my free oscommerce themes checkout page?

E-mail Print PDF

To add CVV2 in my free oscommerce themes checkout page, please download following contribution for Credit Card with CVV2 checkout function, and then replace it with the original files in your osCommerce template's directory.

 

Download: Credit Card with CVV2 Version v2_1.zip

 

Here are some codes included:

 


::FILE REPLACEMENT::

(1) Replacement files found in this zip file
----------------------------------------------------------------------
cc.php at --------- catalog/includes/modules/payment/cc.php
cc_validation.php - catalog/includes/classes/cc_validation.php

Then add the following new files:

catalog/SecCodeExplain.php
catalog/includes/languages/english/SecCodeExplain.php
catalog/images/cc_amex.gif
catalog/images/cc_visa.gif


----------------------------------------------------------------------


::DATABASE::

(2) Execute the following MYSQL code in your database:
(Note: If you don't know how to do this then ask in the forums. Most anyone can explain it)

ALTER TABLE `orders` ADD `cc_cvv2` VARCHAR(4) AFTER `cc_expires`;


----------------------------------------------------------------------

::CODE SECTION REPLACEMENT::


(3) Open file catalog/admin/orders.php

Find this code block(Near line 200)
<?php
    }
?>


REPLACE WITH:

<?php if (MODULE_PAYMENT_CC_CVV2 == 'True') { <br />    ?><br />          <tr><br />             <td class="main"><?php echo ENTRY_CREDIT_CARD_CVV2; ?></td><br />             <td class="main"><?php echo $order->info['cc_cvv2']; ?></td><br />          </tr><br /><?php<br />            }<br />            }<br />    ?><t/extarea><br /><br /><br />----------------------------------------------------------------------<br /><br /><br />(4) Open file: catalog/admin/includes/languages/english/orders.php<br /><br /><br />AFTER: <br />define('ENTRY_CREDIT_CARD_EXPIRES', 'Credit Card Expires:');<br /><br />ADD THIS AFTER:<br />define('ENTRY_CREDIT_CARD_CVV2', 'Card Security Code:');<br /><br /><br />----------------------------------------------------------------------<br /><br /><br />(5) Open file: includes/languages/english/modules/payment/cc.php and add<br /><br /><br />AFTER: <br />define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES', 'Credit Card Expiry Date:');<br /><br /><br />ADD THIS AFTER:<br />define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2', 'Card Security Code:');<br />define('TEXT_EXPLANATION', ' <strong onclick="openexpwindow();">What is this?</strong>');<br /><br />Optional but recommended change:<br /><br />Find the line that reads:<br />  define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER', 'Credit Card Owner:');<br /><br />and change it to read:<br />  define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER', 'Name On Card:');<br /><br /><br />----------------------------------------------------------------------<br /><br /><br />(6) Open file: catalog/includes/classes/order.php,<br /><br /><br />Find this code block(Near line 38)<br />Note: add ", cc_cvv2" after ", cc_expires" as shown here<br />note: Be sure to keep the comma with it.<br /><br /><br />ORIGINAL CODE BLOCK:<br /><textarea>$order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");


REPLACE WITH:
$order_query = tep_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, cc_cvv2, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");


----------------------------------------------------------------------
 

You are here: FAQs How to add CVV2 in my free oscommerce themes checkout page?