如何在Stripe Checkout中禁用默认付款方式(信用卡)

时间:2017-10-29 19:03:18

标签: javascript stripe-payments stripe.js

我只需要一种付款方式(支付宝)。但我无法使用Stripe Checkout(信用卡)禁用默认付款方式。当然,我读过documentation,但我不知道如何才能做到这一点。

这是我的代码。

var handler = StripeCheckout.configure({
    key: 'public_key',
    alipay: true,
    locale: false,
    currency: "usd",
    token: function(token) {
        // Use the token to create the charge with a server-side script.
        // You can access the token ID with `token.id`
    }
});

handler.open({
    name: 'example.com',
    description: 'AliPay Payment',
    amount: 10000
});

谢谢!

1 个答案:

答案 0 :(得分:0)

无法禁用Checkout的默认(卡片)区域。

如果您正在寻找付款表单的更高可自定义性,请查看Stripe.js / Elements和Sources API。您可以使用来源  生成支付宝来源,将用户重定向到支付宝以授权付款,然后将其返回到您的网站https://stripe.com/docs/sources/alipay

相关问题