[英]How can I determine whether or not a card is credit or debit in Braintree?
I am using the Braintree PHP SDK and I'm unable to figure out if a card is a debit card or not. 我正在使用Braintree PHP SDK ,无法确定卡是否为借记卡。
Is it possible to know if the card is debit or credit? 是否可以知道该卡是借记卡还是信用卡?
If you store a credit card with Braintree, the response will include BIN Database information 如果您使用Braintree存储信用卡,则响应将包含BIN数据库信息
country_of_issuance - The country that issued the credit card.
country_of_issuance-发行信用卡的国家。
debit - whether the card is a debit card.
借记卡 -卡是否为借记卡。
Possible values: 可能的值:
Braintree::CreditCard::Debit::Yes
Braintree::CreditCard::Debit::No
Braintree::CreditCard::Debit::Unknown
If you create braintree token
by passing the customer_id
and paymentmethod
follow the link: https://developers.braintreepayments.com/javascript+php/start/hello-server . 如果您通过传递
customer_id
和paymentmethod
创建Braintree token
, paymentmethod
遵循以下链接: https : //developers.braintreepayments.com/javascript+php/start/hello-server 。 From this token you can find the cardtype
. 从这个令牌,你可以找到
cardtype
。
$paymentMethod = Braintree_PaymentMethod::find('token');
I work as a developer at Braintree. 我在Braintree担任开发人员。 Calling
debit
on a payment method returns Unknown
if we cannot determine the type from the BIN number; 如果无法通过BIN号码确定付款类型,则调用
debit
上的debit
返回Unknown
; but, generally speaking, calling debit
will return 'Yes' if it is a debit card. 但是通常来说,如果是借记卡,则呼叫
debit
将返回“是”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.