Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Why does it ask for CVV code when no payment is needed?

tushar_bsiltushar_bsil Member
in Help edited June 2013

I added coupon to my cart to offer product for free, the order total is $0.0 and it does say no payment needed, however, clicking on "confirm your order" gives error:

Verification Code (?)
Please enter your card security code, which is the 3 digit code on the back of your card (for Visa, Mastercard, and Discover), or the 4 digit code on the front (for American Express).

Is there any settings/options to avoid this error?
  • fc_adamfc_adam FoxyCart Team
    edited June 2013

    It looks like you've uncovered a small bug there related to your use of SSO and $0 orders. I'll document it up on our side to get fixed asap, but in the meantime, if you include this on your checkout, that will get around the bug for the interim.
    <script type="text/javascript">
    function cvv_required_check() {
    	var orderTotal = parseFloat(jQuery("#order_total").val());
    	if (orderTotal > 0 || FC.checkout.config.isUpdateCustomer || FC.checkout.config.hasSubscriptions) {
    		FC.checkout.config.cvv2Required = false;
    FC.checkout.overload('validateAndSubmit', 'cvv_required_check', null);
  • Thanks Adam, I will use the suggested workaround.
  • Adam, placing this function throws "Uncaught ReferenceError: paymentInfoRequired is not defined" error and hence fails to process confirm order button. I placed this script block in the header section just below the FC js file links
  • fc_adamfc_adam FoxyCart Team

    Sorry - that's my fault. Grab an updated copy of the snippet above.
  • Thanks, actually that is what I did, I looked into your .js file and got the relevant code from that function into my script.
Sign In or Register to comment.