【问题标题】:Get credit card type for custom form using braintree使用 Braintree 获取自定义表单的信用卡类型
【发布时间】:2015-10-01 12:32:19
【问题描述】:

在我的卡号字段中,按键时我想用图标显示卡类型。

对于那个我使用braintree.. 见下面的代码

braintree.setup(clientToken, "custom", {
  id: "checkout",
  onPaymentMethodReceived: function(obj){
    console.log(obj.details.cardType);
  }
});

通过上面的代码,我在提交时获取了信用卡类型,我怎样才能让它发生在密钥上...

谢谢

【问题讨论】:

标签: javascript jquery braintree


【解决方案1】:

查看this

提供卡片类型及其格式,让您更轻松地创建regex

使用以下工具构建和测试regex

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-31
    • 2015-04-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多