I am using Stripe as a payment gateway for our customers. There's possible to use a jQuery plugin for a real-time validation of information that customers put into the check out form (this plugin validates format of the credit card, CVC number and expiration - in terms of checking if the set up validity is not in the past).
The problem is that when a user send the checkout form with, for example, incorrect CVC number or incorrect expiration date, then I get an error on the back-end.
Stripe::CardError (Your card was declined.)
Is there any way to run this credit card verification through AJAX? For example, if the set up credit card has some information incorrectly set up, the checkout form would not be sent.
Thank you
expiry
,cvv
,card number
etc on your server end, before sending it to stripe – RAJ