Turn of CVV requirement

gl330kgl330k Member
in Bugs & Feature Requests edited March 2008
Hi

Is there a way to turn off the requirement to have CVV for checkout?

Thanks.
Comments
  • lukeluke FoxyCart Team
    The CVV authorization is usually handled on the payment gateway side of things, so if your gateway doesn't required it, you should be ok.

    You could try setting a default value for the cvv and hide the field using some javascript in your template.

    If more people want to disable the CVV, we might be able to build that into the store settings, but generally it's a good idea to include as much information as you can because it might affect your capture rates with your payment processor.
  • brettbrett FoxyCart Team
    Like Luke said, it's a gateway thing, but rather than hide it or fill it in with a default value, I think the best thing to do would be to remove that field from the checkout entirely with some javascript. That way you're not submitting anything wrong, which might create problems depending on your gateway.
  • lukeluke FoxyCart Team
    err.. yeah.. what he said. :)
  • Are there not issues with holding CVV data? I read on another Cart that if you hold this data then Visa and Mastercard have issues.

    This from the other cart:

    "By checking the 'Obtain CVV2 Code' checkbox you understand that the CVV2 code will be stored for 7 days on our secure servers. Please note that under VISA and Mastercard rules, this is not allowed. This means that if card details are compromised and used fraudulently, VISA and Mastercard may attempt to recover their losses from yourselves."

    Does Foxycart retain the CVV data on its servers?
  • I just found another thread where you clearly state that this is a no no! http://forum.foxycart.com/comments.php?DiscussionID=105&page=1#Item_0

    I know - have faith in you guys!
  • lukeluke FoxyCart Team
    We definitely do not store cvv numbers anywhere and we encrypt credit/debit card numbers in our database in order to process subscriptions. We also give the customer the option to not have their credit/debit card numbers saved at all.
  • FYI - for anyone else who is trying to remove fields from output. I'm not sure if this is in the wiki anywhere but I used the following code to accomplish this.

    This goes in the head portion of the checkout template:
        <script type="text/javascript">
        //<![CDATA[
        
        function removeById(id) {
            el = document.getElementById(id);
            el.parentNode.removeChild(el); 
        }
        
        
        //]]>
        </script>
    

    And this would go in the body tag of the template if you wanted to get rid of the CVV field
    <body id="checkout" onload="removeById('li_cc_cvv2');">
    
  • brettbrett FoxyCart Team
    Thanks for sharing.
    I changed it to jQuery (since it's already loaded on checkout anyway) and added it to our FAQ:
    http://wiki.foxycart.com/faqs
  • Brett,

    I found out we are having an issue with this. During attempted purchase the following error appears:

    "Error: Please enter the verification code for your credit card."

    Is the only possible reason for this that the merchant account is requiring the CVV code? Or is it possible that the javascript removal of the field isn't affecting the validation process so it's still looking for a CVV field?

    Thanks
  • lukeluke FoxyCart Team
    Sorry, I should have jumped into this thread earlier. Most of our validation takes place both server side and client side, so just removing the field probably won't help. Is there are reason you can't have the customer enter the cvv2 on checkout? You should still be able to configure your payment gateway to not require it, but I think most online customers expect to be asked for it and might be concerned about security if you don't ask for it.
  • luke

    The customer really does want to not include the cvv2 field. maybe I will just go the route you suggested earlier.

    [ulist]
    [li]set a default value with js[/li]
    [li]hide the field with CSS[/li]
    [/ulist]

    Do you see any issue with this on your end?
  • lukeluke FoxyCart Team
    That should work just fine as long as your payment gateway is not trying to validate the cvv2.
  • ggeigerggeiger Member
    This thread was helpful, as I also need to remove the CVV2 field and provide a default value. I've successfully removed the field thanks to Brett's addition to the FAQ, but I don't know how to give a default value. I tried adding a hidden field named
    cc_cvv2
    
    with a value of "000" but it does not work. Can you tell me how I can provide a default value for the CVV2 field, given that I've removed it with your jQuery code?
  • gl330kgl330k Member
    This is old code that worked for me. You could easily refactor it to work in jQuery
    ...
        <script type="text/javascript">
        function setCVV2() {
    
            document.forms.fc_form_checkout.cc_cvv2.value = 111;
        }
        </script>
    </head>
    <body id="checkout" onload="setCVV2();">
    ...
    
  • ggeigerggeiger Member
    Thanks for the snippet gl330k. I tried entering it into the head of my checkout template but no dice. I still receive "Error: Please enter the verification code for your credit card." when trying to checkout with the CVV2 field turned off. I'm not familiar enough with javascript and jQuery to mess with what you wrote there. Any other suggestions?
  • gl330kgl330k Member
    ggeiger,

    I would not use the jQuery remove code. Use the code above that I sent to set the value for the CVV field and then use CSS to hide the CVV field.
    #li_cc_cvv2 label,
    #li_cc_cvv2 input {
        display: none;
    }
    

    My guess is that the jQuery code in the FAQ removes the field from the DOM. Thus a value can't be set to it. This is how I've dealt with the situation.

    Hope that makes sense.
Sign In or Register to comment.