View Full Version : CyberSource SOP Module

02-02-2007, 07:51 PM
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)


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.


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... (http://www.oscommerce.com/community/contributions,4401)