it would be great, if like paypal, the hosted CIM would automatically verify if the card is valid and turn red/green (just based on the algorithm, not AVS) and even better, to highlight the card type.
Here's some JS for client-side just to see what type it is.. It doesn't do the luhn check, though.
javascript.gakaa.com/credit-card-type-by-number.aspx
Or a js protype based code that does Luhn, but I'm not sure if it returns the type of card - only if it's accepted:
github.com/madrobby/creditcard_js
Since it's the hosted CIM, I don't think I can change this myself, right?
p.s. sorry for no links, it kept preventing the post because of bogus html issues.
Solved! Go to Solution.
11-16-2011 02:58 PM
Hey thanks for the suggestion! I'll pass that on to our developers for sure.
Thanks,
Michelle
Developer Community Manager
11-28-2011 02:43 PM
Cool idea, if someone over at the development team is feeling bored and wants to do something fun for an hour or so.
11-16-2011 05:29 PM
Hey thanks for the suggestion! I'll pass that on to our developers for sure.
Thanks,
Michelle
Developer Community Manager
11-28-2011 02:43 PM
Oh so I checked wikipedia.. supposedly all Amex start with 34 and 37, so if that's the number you know it's the 4 digits on front you need.
11-30-2011 02:02 AM