This is a discussion on CyberSource SOP Module within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This is a great contribution, but I noticed that there was a small bug in the error handling that caused ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| This is a great contribution, but I noticed that there was a small bug in the error handling that caused a "CVV code supplied is invalid" error during validation if the Card Validation Value was set to "Disabled" in the module configuration. Here is the proper code for the fix: In file: catalog/includes/modules/payment/cybersource.php Find line 289 which states: if(strlen($HTTP_POST_VARS['card_cvNumber']) < 3 || strlen($HTTP_POST_VARS['card_cvNumber']) > 4) AND REPLACE IT WITH THE FOLLOWING: if(MODULE_PAYMENT_CYBS_CVV == 'Required' && strlen($HTTP_POST_VARS['card_cvNumber']) < 3 || strlen($HTTP_POST_VARS['card_cvNumber']) > 4) As you can see, the original code was not specifying the correct instance to check for a valid CVV. ALSO: There seems to be a problem with the credit card types not setting properly in the admin module. If you check the boxes next to any credit card types other than Visa or MasterCard, or if you try to uncheck Visa or MasterCard, your settings are not saved. It will not allow you to change this option. For now, the only solution is to manually change the option via SQL commands. This is not a proper fix and I will not outline how to do this. However, if anyone knows how to fix this problem properly, please post the remedy code or contact me. Many thanks to chiviak, the original author of this contribution. His hard work has made it a lot easier for us less-knowledgeable programmers. ;) PLEASE NOTE: the attached file is a DUMMY text file with this same exact text written in it. For the full package, please see chiviak's file below! More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CyberSource payment Module solution | Arpit | osCMax v1.7 General Mods Discussion | 0 | 11-08-2004 01:18 PM |