default expiration values

joefranksjoefranks Member
in Bugs & Feature Requests edited September 2011
Hey guys, been slogging through converting our site to fc for a long time now, the end is in sight I think, but I have a quick question as I'm tweaking the checkout pages.

The default exp date, (current month and next year) seems odd to me, not really wrong but different than I usually expect. Since I haven't turned a payment gateway on I guess I don't know what will happen if a user just blindly clicks ahead without setting the month/year correctly. Does the gateway typically just error and return invalid card in that case?

I think my preference would be just default month/year blank options which is no problem to add in with jquery but I don't know where the best place to put the validation function for this would be. Is there a something similar to the preprocess events in the checkout script or should I try and just setup a small validation wrapper that I bind to the checkout button and run the FC.checkout.validateAndSubmit() when it finishes?

Any thoughts would be appreciated, thanks!
  • brettbrett FoxyCart Team
    @joefranks, that's a really interesting question that hasn't come up before. I just poked at it a little bit, but it's slightly more tricky than just prepending an empty selected option to each select box and adding the fc_required class. That's how the validation _should_ work, but in this case we have different validation going on that's conflicting.

    Fwiw, triggering the actual error can happen with:
    But that doesn't really help for the actual place to insert the validation. We'll get back to you about that.
Sign In or Register to comment.