osHelpers - Help for your osCommerce store
 
Google Base Feed Germany
iFrame Defender v1.2
oscommerce Seo
  Seo Pack 2
  SE Friendly URLs
  Session ID Removal
  Title and Meta Tags
  Google Sitemap
Magnum Shopping Cart
  Magnum MVS 8.4 Basic
osCommerce Services
  osc / cre patch
  Data Entry
  Data Extraction
  bugs and fixing
  Site Transfer
  creloaded Transfer
  Design Special
  Hosting
osCommerce Templates
osCommerce Contributions
  Credit Modules
  Features
  Images
  InfoBoxes
  Languages
  Order Total Modules
  Other
  Payment Modules
  Reports
  Shipping Modules
  Templates/Themes
  Zones
osCommerce Articles
osCommerce Tutorials
  Installing osCommerce
  Configuring your store
  Adding categories
  Adding products
  Adding product attributes
  Configuring currency
  Adding payment modules
  Adding shipping modules
  Configuring sales tax
  Editing your home page
  Editing columns
  Editing header and footer
  Creating specials
  Managing customers
  Sending out a newsletter
  Sending out email
  Managing your banners
  Backup database
CRELoaded Tutorials
  Add Administrators
  Add Article Author
  Additional Images
  Create a New Page
  Define Mainpage
  Disable cc Encryption
  Disable Company Field
  Disable Country
  Disable Date of Birth
  Display broken images
  Easypopulate Export
  Email confirmation
  Insert Faq
  Max Package Weight
  Require Terms of Use
  Affiliate Newsletter
  Enable Cache
CB Power Affiliate
Tell A Friend
 

Tell someone you know about this product.

   OSHELPERS | OSCOMMERCE CONTRIBUTIONS | PAYMENT MODULES | 3113   


oscommerce cvv2forentireorder
[3113]
 
 
box_bg_l.gif.
"This mod adds cvv2 credit card fields to osc that follows the entire order
process. It is for use with the the credit card payment module.

Inspiration for this mod comes from the cvv2 cc.php mod which I used parts
of in the cc.php file.

The included files should only be used on an unmodified OSC 2.2.

Just back up the corresponding files and copy these over them.

Otherwise you can follow these manual instructions. If you have modified OSC
in some way modify these directions as you need.

If you like this mod and would like to show appreciation feel free to drop
something into my paypal account.


Manual directions:


In checkout_process.php

AFTER:

'cc_number' => $order->info['cc_number'],

ADD:

'cc_cvv2' => $order->info['cc_cvv2'],


In includes/modules/payment/cc.php

AFTER:

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER,
'field' => tep_draw_input_field('cc_number')),

ADD:

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2,
'field' => tep_draw_input_field('cc_cvv2')),

AFTER:

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER,
'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) .

substr($this->cc_card_number, -4)),

ADD:

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2,
'field' => $_POST['cc_cvv2']),

AFTER:

tep_draw_hidden_field('cc_type', $this->cc_type) .

ADD:

tep_draw_hidden_field('cc_cvv2', $_POST['cc_cvv2']);


In includes/languages/english/modules/payment/cc.php

AFTER:

define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER', 'Credit Card Number:');

ADD:

define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2', 'CVV2:');


In includes/classes/order.php

In the line:

$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 . "'");

BETWEEN:

cc_number, cc_expires,

ADD:

cc_cvv2,

AFTER:

'cc_number' => $order['cc_number'],

ADD:

'cc_cvv2' => $order['cc_cvv2'],

AFTER:

'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''),

ADD:

'cc_cvv2' => (isset($GLOBALS['cc_cvv2']) ? $GLOBALS['cc_cvv2'] : ''),


In admin/orders.php

AFTER:

<tr>
<td class="main"><?php echo ENTRY_CREDIT_CARD_NUMBER; ?></td>
<td class="main"><?php echo $order->info['cc_number']; ?></td>
</tr>

ADD:

<tr>
<td class="main"><?php echo ENTRY_CREDIT_CARD_CVV2; ?></td>
<td class="main"><?php echo $order->info['cc_cvv2']; ?></td>
</tr>

In admin/includes/language/english/orders.php

AFTER:

define('ENTRY_CREDIT_CARD_NUMBER', 'Credit Card Number:');

ADD:

define('ENTRY_CREDIT_CARD_CVV2', 'CVV2:');


In admin/includes/classes/order.php

In line:

$order_query = tep_db_query("select 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 . "'");

BETWEEN:

cc_number, cc_expires,

ADD:

cc_cvv2,

AFTER:

'cc_number' => $order['cc_number'],

ADD:

'cc_cvv2' => $order['cc_cvv2'],



In phpMyAdmin or from commandline mysql run:

ALTER TABLE `orders` ADD `cc_cvv2"

 


For more information, visit the official osCommerce contribution webpage.
box_bg_r.gif.
 

osHelpers

osHelpers