Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cvv help!!!


Guest

Recommended Posts

Hi,

 

I installed cvv add on. Everything is working fine. What I need help is on how can I force people to always put there cvv number before proceeding. Just like when they have to put 10 numbers in the credit card field. Thank You!

Link to comment
Share on other sites

What version are you using as the newer ones should have this built right in. In catalog/includes/modules/payment/cc.php you should have a script that looks like this:

    function javascript_validation() {

     $js = '  if (payment_value == "' . $this->code . '") {' . "n" .

           '    var cc_owner = document.checkout_payment.cc_owner.value;' . "n" .

           '    var cc_number = document.checkout_payment.cc_number.value;' . "n" .

           '    var cvvnumber = document.checkout_payment.cvvnumber.value;' . "n" .

           '    if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "n" .

           '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CC_OWNER . '";' . "n" .

           '      error = 1;' . "n" .

           '    }' . "n" .

           '    if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "n" .

           '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CC_NUMBER . '";' . "n" .

           '      error = 1;' . "n" .

           '    }' . "n" .

           '  }' . "n" .

           '    if (cvvnumber == "" || cvvnumber.length < ' . CVVNUMBER_MIN_LENGTH . ') {' . "n" .

           '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CVVNUMBER . '";' . "n" .

           '      error = 1;' . "n" .

           '    }' . "n" .

           '    if (cvvnumber == "" || cvvnumber.length > ' . CVVNUMBER_MIN_LENGTH . ') {' . "n" .

           '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CVVNUMBER . '";' . "n" .

           '      error = 1;' . "n" .

           '    }' . "n";





     return $js;

 

You will need to have entered this into your mySql DB query box:

INSERT INTO configuration VALUES ( 1??, 'CVV2 Number', 'CVVNUMBER_MIN_LENGTH', 3, 'Minimum Length of CVV2 Number', 2, ??, '2003-01-11 10:30:00', '2003-01-11 10:30:00', NULL , NULL );

....and have filled in the question marks above to represent the desired configuration_id and sort_order for your particular database as it varies depending on what else you have added along the way.

 

Lastly you need to have defined MODULE_PAYMENT_CC_TEXT_JS_CVVNUMBER in the file catalog/includes/languages/english/modules/payment/cc.php

 

HTH

Link to comment
Share on other sites

Thank you very much for your reply. You have been helpful and I will do as you told me when I get a chance and will let you know how it when. Have a good day! I really thankfull.

Link to comment
Share on other sites

if (cvvnumber == "" || cvvnumber.length < ' . CVVNUMBER_MIN_LENGTH . ') {' . "n" .  

           '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CVVNUMBER . '";' . "n" .  

           '      error = 1;' . "n" .  

           '    }' . "n" .  

           '    if (cvvnumber == "" || cvvnumber.length > ' . CVVNUMBER_MIN_LENGTH . ') {' . "n" .  

           '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CVVNUMBER . '";' . "n" .  

           '      error = 1;' . "n" .  

           '    }' . "n";  

 

 

Are there any way to change this part to 1 single check instead of 2? If the customer tries to continue with a empty cvv box, it gives the same error message two times.

 

Regards

Michael

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...