View Full Version : cc_validation.php Error

07-29-2005, 01:16 PM
I'm testing a site:

To test go to the "PSYCHOLOGY " section its the only one with complete product set up. Products are downloadable MP3s.

payment module = 2CheckOut (test mode)
When ordering product(s) after entering the credit card info on checkout_payment.php and clicking continue to checkout_confirmation.php an error comes up:
Warning: Missing argument 4 for validate() in /home/talktot/public_html/shop/includes/classes/cc_validation.php on line 16

Warning: Missing argument 5 for validate() in /home/talktot/public_html/shop/includes/classes/cc_validation.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/talktot/public_html/shop/includes/classes/cc_validation.php:16) in /home/talktot/public_html/shop/includes/functions/general.php on line 29

(All fields were filled in the form including 3 digit Check Number)

The above error is thrown during a routine check out.
Interesting side note - I have set up a wholesale product (its Barbara DeAngelis "How Did I Get Here") with the price of $0.00 for customer group "Member" i.e. Wholesale
Below is a "Member" test account
login: name:[email protected] password:testing

When a Member purchases a product at the wholesale price of $0.00 the order goes through without an error.

Can this be fixed?

server specs:
PHP 4.3.8 W/ Zend Optimizer
MySQL 4.0.22

07-29-2005, 04:38 PM
As I hack my way through this, I can only hope I do more good than damage!

I edited line 104 in /catalog/modules/payment/pm2checkout.php

$result = $cc_validation->validate($HTTP_POST_VARS['pm_2checkout_cc_number'], $HTTP_POST_VARS['pm_2checkout_cc_expires_month'], $HTTP_POST_VARS['pm_2checkout_cc_expires_year']);

$result = $cc_validation->validate($HTTP_POST_VARS['pm_2checkout_cc_number'], $HTTP_POST_VARS['pm_2checkout_cc_expires_month'], $HTTP_POST_VARS['pm_2checkout_cc_expires_year'], $HTTP_POST_VARS['pm_2checkout_cc_cvv']);

So the post will pass the CVV

Now that gets rid of the missing argument 4 error below:
Warning: Missing argument 4 for validate() in /home/talktot/public_html/shop/includes/classes/cc_validation.php on line 16

But the missing argument 5 is refering to the credit card type in cc_validation.php on line 16:
function validate($number, $expiry_m, $expiry_y, $cvv, $cr_card_type) {

The credit card type is not passed in the post (as far as I can tell) it looks like it is parsed in the cc_validation.php script

Does anyone have osCMAX v2 working with 2CheckOut?

08-01-2005, 06:33 AM
Forget the help request for now. I moved my database tables to another osCommerce installation and now the oscMAX installation is completely hosed.

The lesson I learned is NEVER attempt to use BETA versions for production web site, my bad.