cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-show credit card type in hosted CIM?

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.

avimarcus
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Hey thanks for the suggestion! I'll pass that on to our developers for sure.

 

Thanks,

 

Michelle

Developer Community Manager

View solution in original post

3 REPLIES 3

Cool idea, if someone over at the development team is feeling bored and wants to do something fun for an hour or so.

TJPride
Expert

Hey thanks for the suggestion! I'll pass that on to our developers for sure.

 

Thanks,

 

Michelle

Developer Community Manager

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.