O'Reilly logo

Take My Money by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Client-Side Validation

Let’s start with client-side validation, which means validating the credit card data users enter in the shopping cart on the way to making a purchase. Our responsibility on the client side is to prevent customers from sending invalid data to the Stripe API server, and in case of an error in the token API call, inform customers that their purchase has been stopped. In this case, invalid data could mean an invalid credit card number, an expiration date that is in the past, a bad CVC number, and so on.

Stripe maintains the jQuery.payment[31] plugin, which is a jQuery plugin that implements a number of credit card validation functions that we can tie to the form that we created in Gathering Information. A nice feature of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required