News for hackers. Stuff that matters.
Re:jQuery.payment by asimeqi on Thursday February 07, 2013 @05:07PM (#5184833)
I worked for a gift card company and wrote and maintained some client side card validation code. My suggestion for client side card validation is "don't do it". As your client gets used more and more you will see a wild variety of cards. The minimum card length I have seen is 5. The maximum is 22. Some cards have correct checksum and some don't have checksum at all. Some cards have only numbers and some cards have letters and numbers. At the end we stripped all our fancy validation code and left only a check that card length was 3 or more.

All card validation must be server side.

Re:jQuery.payment by ceejayoz on Thursday February 07, 2013 @05:17PM (#5184884)
Gift cards aren't credit cards. The docs say "a general purpose library for building credit card forms", not "a general purpose library for building payment forms".
Re:jQuery.payment by jfoster on Thursday February 07, 2013 @11:28PM (#5186283)
How does it become easier to do such validation server-side?
Re:jQuery.payment by cj on Thursday February 07, 2013 @11:42PM (#5186332)
You can attempt to process it through your payment gateway (ie. stripe) and check for a success or failure.
Re:jQuery.payment by jimktrains2 on Saturday February 09, 2013 @11:15AM (#5192909)
That becomes expensive. The more you can do on your own, the less in fee's you'll accumulate.