Reply
Member
Posts: 4
Registered: ‎09-05-2011
Accepted Solution

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.


Accepted Solutions
Solution
Accepted by topic author avimarcus
‎08-21-2015 01:58 AM
All Star
Posts: 1,072
Registered: ‎08-17-2009

Re: Auto-show credit card type in hosted CIM?

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


All Replies
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: Auto-show credit card type in hosted CIM?

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

Solution
Accepted by topic author avimarcus
‎08-21-2015 01:58 AM
All Star
Posts: 1,072
Registered: ‎08-17-2009

Re: Auto-show credit card type in hosted CIM?

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

 

Thanks,

 

Michelle

Developer Community Manager

Member
Posts: 4
Registered: ‎09-05-2011

Re: Auto-show credit card type in hosted CIM?

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.