You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Braintree JavaScript v4 SDK中隐藏PayPal Credit按钮

求助:如何禁用Braintree PayPal集成中的PayPal Credit按钮?
  • 已两次提交Braintree/PayPal支持工单但未收到回复
  • 近期未修改任何代码,支付页面突然出现“PayPal Credit”按钮,需要禁用该按钮
  • 疑问:此情况是否仅为沙箱账户的默认显示行为?目前生产环境暂未受影响

我们使用的JavaScript SDK版本信息如下:

braintreeClient: "https://js.braintreegateway.com/web/3.87.0/js/client.min",
hosted_fields: "https://js.braintreegateway.com/web/3.87.0/js/hosted-fields.min",
checkoutJs: "https://www.paypalobjects.com/api/checkout.min",
paypalCheckout: "https://js.braintreegateway.com/web/3.87.0/js/paypal-checkout.min"

我尝试在创建支付时传入offerCredit: false参数,但并未生效:

// Set up PayPal with the checkout.js library
paypal.Button.render({
    env: '{{ braintree_env }}', // 'sandbox' or 'production'
    style: {
        label: 'paypal',
        size:  'responsive',    // small | medium | large | responsive
        shape: 'rect',     // pill | rect
        color: 'white',     // gold | blue | silver | black
        tagline: false,
        width: 500,
        height: 55
    },
    payment: function () {
        return paypalCheckoutInstance.createPayment({
            flow: 'vault', // required to allow us to charge the account in future without re-authentication
            offerCredit: false
        });
    },
});

内容的提问来源于stack exchange,提问作者crmpicco

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 04:15:36