简体   繁体   English

有没有办法检测卡的类型,即借记卡或信用卡

[英]Is there a way to detect the type of card i.e Debit or Credit

I need to detect the card type: Debit or Credit when the customer is on website's checkout page.当客户在网站的结帐页面上时,我需要检测卡类型:借记卡或信用卡。

I am using the library ie https://github.com/braintree/credit-card-type already to determine the card brand ie Visa,Amex,Mastercard etc. But these don't provide the card type info.我正在使用图书馆,即https://github.com/braintree/credit-card-type已经确定卡品牌,即 Visa、Amex、Mastercard 等。但这些不提供卡类型信息。 Is this possible at all.这可能吗?

Yes, it is possible.对的,这是可能的。 You need to get a list of BIN ( B ank I dentification N umbers) which correlate to card type (debit or credit).您需要获得与卡类型(借记卡或贷记卡)相关的BIN (银行识别)列表。 You then can compare the BIN number, which is the first 4-9 numbers of the card, to that list which will tell you the card type.然后,您可以将 BIN 号(即卡的前 4-9 个数字)与将告诉您卡类型的列表进行比较。

Processors like Worldpay and Card Connect make lists like this available. Worldpay 和 Card Connect 等处理器可以提供此类列表。 I am unsure if there is a cost or not.我不确定是否有费用。 I found this free one but you'll need to massage it a bit to consume it programmatically.我找到了这个免费的,但你需要稍微按摩一下才能以编程方式使用它。 This API also claims to be free.这个 API也声称是免费的。

Another api solution at rapidapi Bank Card Bin Num Check there are 250K+ issued card type.另一个api解决方案在rapidapi Bank Card Bin Num Check there is 250K+ issued card type。

Just one GET request with cards first 6 number.只需一个 GET 请求,其中包含卡片的前 6 个数字。 and see result并查看结果

{ "bin_number": 535177, "bank": "Finansbank A.S.", "scheme": "MASTERCARD", "type": "Debit", "country": "Turkey" }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM