Community Add-Ons
Credit Card with CVV2
for osCommerce Online Merchant v2.2
This is the normal credit card module from oscommerce, only added the cvv2 field, and also fixed for php5.03 version.
Legend:
Download
Report
You have to do is edit $sql_data_array in catalog/checkout_process.php from:
FInd:
/*
'cc_type' => $order->info['cc_type'],
'cc_owner' => $order->info['cc_owner'],
'cc_number' => $order->info['cc_number'],
'cc_expires' => $order->info['cc_expires'],
'cc_cvv2' => $order->info['cc_cvv2'], //CVV2
*/
and replace:
'cc_type' => $_POST['cc_type'],
'cc_owner' => $_POST['cc_owner'],
'cc_number' => $_POST['cc_number'],
'cc_expires' => $_POST['cc_expires'],
'cc_cvv2' => $_POST['cc_cvv2'], //CVV2
That's it.
Thank you.
When i tried to update the Image files for the CC I got an error 'TABLE_EPF_VALUES' table do not exists I changed it to 'TABLE_CREDIT_CARDS' and it worked.
I uploaded only the corredted file:credit_cards.php
Hope this helps somebody.
There is no real change since version 2.3, I've merely corrected the script declaration tags in the admin/credit_cards.php and modules/payment/cc.php files to the correct format for HTML 4 (from <script language="javascript"> to <script type="text/javascript">).
Complete contribution is attached for those who are new.
The purpose of this addition to the contibution is to make it as easy in osCommerce 2 to select which credit cards are accepted by the store as it is in osCommerce 3. This contribution will work with any payment module that uses the osCommerce cc_validation class to prevent a credit card type that is not accepted from being used by the customer. It also displays which credit cards are accepted by the store on the payment page and in an info box.
The cc_validation class now returns a text error message variable as well as a negative return number if an error was found. This message is now used by the credit card module in lieu of its own error messages for every possible error code returned by cc_validation. The errmsg variable will be null if no errors were found. If $test = new cc_validation(); then $test->errmsg will contain the error message, if any, once the validation function has been called.
Note that you will need to make the new images/credit_cards/ folder writable if you plan to use the incuded credit card editing utility to change the logo image for a credit card or if you plan to delete a credit card with a logo image file. In the credit card editing utility you can change whether a card is accepted or not by clicking its 'yes' or 'no' text in the accepted column of the card list without having to actually select and edit the card.
The Credit Card with CVV2 has been updated. To remove the CVV2 and CC numbers from the database. JUST MAKE SURE TO PRESS ZAP IN ORDER TO DELETE THE CC + CVV2 NUMBERS. I have not yet found a way to delete the code automatically. But I will place it on here As soon as I do. The orginal files are here, there are more steps if you start off clean, but if not just do 16,17,18, and 19.
Someone discovered that a couple of definitions were missing from the cc.php language file. Apparently the osCommerce team had removed them from the RC series language file when they originally disabled the functionality of the cc module. The cc.php file in this download has restored the correct definitions which I found in an MS2 version of the file which I thankfully still had. The complete install is enclosed but only the language file has changed since the last upload.
We use three different payment modules in our store (credit card with CVV, check/money order, and will call with credit card) and have been fighting a problem with customers entering credit card information but clicking the button for the wrong payment type, thus preventing the credit card information from being saved. First we tried reversing the columns in checkout_payment to place the radio buttons immediately in front of (and therefore much closer to) the name for the payment method. Then we tried reordering the payment methods so credit card was listed first, putting the radio button for it far away from the others. We even tried using CSS to highlight alternating payment methods with a somewhat different background color so that the radio buttons are even more clearly associated with the corresponding payment method. After all this we STILL have a problem with customers entering credit card information but selecting the wrong payment method button.
I am hoping this slightly revised version of CC with CVV solves the problem for good. It now inlcudes a short javascript that is activated any time any of the credit card information fields are changed by the customer. The script finds the radio button for the credit card payment method and turns it on thereby selecting credit card as the payment method.
To upgrade from a previous version of Credit Card with CVV simply replace the two cc.php files with the included files. The full install is enclosed for those that need it.
Bug fix in the cc_validation.php file. I missed the closing parenthesis on two if statements. Complete contribution enclosed but only the cc_validation.php file has changed.
After finding out that the ereg functions used in the credit card validation have been deprecated as of PHP version 5.30 I updated this contribution to use the corresponding preg funcions instead. I've added a couple of checks to the CVV validation and a way to easily choose which credit cards your store accepts.
If you have already installed this contribution simply replace the cc.php and cc_validation.php files with these new ones then follow steps 14 and 15 of the install instructions. The first language line defined in step 14 is the same as previous versions, the remaining lines are new.
I had a person ask about emailing the CVV with the middle digits of the credit card. This updated version enables that functionality. If you set the module to email the middle digits of the credit card then the CVV will also be emailed and neither the middle digits of the card nor the CVV will be stored in the database. I've also updated the instructions with a note about where to add your choice of credit card encryption routines of which there are several to choose from in the contributions.
The complete package in enclosed but only the modules/cc.php file has changed.
After posting my corrected version of credit card with CVV2 for RC2a I got a note from a person who was having a problem with the popup explanation window giving an error message. After comparing the code for the popup window with other osCommerce files I discovered that the PHP section at the beginning needed to occur before any HTML tags. The enclosed package is complete but the only file that has changed from the previous posting is the catalog/SecCodeExplain.php file. If you are upgrading you only need to replace that one file.
I discovered that the cc.php file in the package by googlejunky did not work at all. I've fixed the file so it works now and updated the package with a popup explanation window for those customers who do not know what a credit card security code is or where to find it. I've also updated the instructions with the additional information needed to get this contribution to work with osCommerce RC1 or later.
Please note that any store that uses this contribution also NEEDS to use one of the credit card number encryption contributions and modify it to encrypt the CVV2 as well. As a further precaution I would also install one of the contributions that erases the credit card number when it is no longer needed and modify that to erase the CVV2 as well. Erasing the CVV2 when it is no longer needed is probably also necessary to comply with banking regulations that prohibit a merchant from retaining the credit card security code any longer than is needed to process the order.
This Version number will reflect the last known oscommerce version it is known to work with.
Updated from a version called "Credit Card with CVV2" which was out of date.
It was made to work with osCommerce Online Merchant v2.2 Release Candidate 2a
fixed acouple of minor glitches. Sorry for the confusion. Use this cvv2_version2_1_2.zip package, not the last one I uploaded.
Module update to add ccv2 enable-disable from your Admin Panel. Great if you change card processors, or have multiple carts, some requiring ccv2 and some not.
Full Package.
This is the corrected cc.php who work with php5
This file contains alternate, generic definitions for the CVV2 field label.
(I use these instead of the original contribution because the CVV2 is NOT always three letters and is NOT always on the back of the card. On Amex cards, it's four letters, on the front.)
I translated the readme into english (mostly I guessed based on context because I know Spanish not French)
I moved some stuff around to make it easier to read and install. I altered a few code bits for uniformities sake.
Have fun!
same contribution with files in french german and espanol
The script did not write the CVV2 value to the database and the CVV2 did not appear on the admin section. The SQL queries needed to be changed in order to do this.
This package includes all the previous versions and all sql query changes to write the data to DB and give admin access to view it.
Minor bug fix. When looking at the order you may get this prompt for the CVV2
MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2
instead of CVV2:.
To fix this, edit includes/languages/english/modules/payment/cc.php, add the following line and it should take care of it.
define('MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV2', 'CVV2:');
File uploaded is just this text.
I had based this on Bogdan's mod, but there have been some questions on how to add it to the DB and also how to view it. So I put all the pieces together in the enclosed readme. This file includes the files in the previous version plus the more detailed readme. You will have to do 1 query and edit 2 more files to get it complete.
My wife needed CVV code for her store's site (www.wvroomtogrow.com), but her CC processor required the CVV code to process payment, thus the necessity. So, I added error checking for the CVV2 code.
Based on the original CVV2 mod... the install requires you to recopy two files.
Let me know if anyone finds a bug or has any recommendations.
This is the normal credit card module from oscommerce, only added the cvv2 field, and also fixed for php5.03 version.
