You are not logged in.
Hi,
So I know I can use Zend_Validate to Validate a Credit Card number against a list of "accepted" credit card types.
I was wondering if there is a similar feature / way to determine what type of credit card it is based on credit card number?
Cheers,
Ryan
Offline
Hi Ryan,
you could encapsulate these business rules into a Zend Web Service and be good to go:
http://www.merriampark.com/anatomycc.htm
Hope that helps,
-
Jon
Offline
Hey Jon,
Yeah I have it detecting now however there is a few problems with it's success based on what the banks have been doing.
http://en.wikipedia.org/wiki/Bank_card_number
Eg: Diners Club US and Mastercard eventually share the exact same prefix / length as "On November 8, 2004, MasterCard and Diner's Club formed an alliance." and differ based on region.
Now we do GeoIP the user but that's not 100% either.
I'm thinking the only solution will be when multiple card types are found to populate a dropdown box and ask the user to be more specific.
Frustrating haha, if only card prefix with length were independent. If Diners Club US had a different length to Mastercard then it would be easy but nope >.<
Offline
Well luckily we're not supporting cards like Diners Club US so everything works well ![]()
Cheers for that reference Jon ![]()
Offline
I was also thinking... I did some work with Authorize.net at one point and I'm not sure but they might hav had a call in their API to return the card type...
Offline
Yeah unfortunately the payment provider we are going with only takes credit card info / type etc to make a payment, no APIs to determine card type etc ![]()
Offline
Hi
The details are all on Wikipedia: wikipedia.org/wiki/Credit_card_numbers
Good luck ...
---------------------
director search
Offline
Yes we saw this however it isn't as up-to-date as we hoped, all sorted now though
Thanks for your help ![]()
Offline