【问题标题】:Hide PayPal button using checkout.js使用 checkout.js 隐藏 PayPal 按钮
【发布时间】:2019-08-05 15:41:33
【问题描述】:

我正在使用PayPal's checkout.js,在视图中我同时显示了 PayPal 按钮和信用卡的小按钮。但是如果我只想显示信用卡按钮并隐藏 PayPal 按钮,我该如何实现呢?

html:

  <div id="paypal-button" class="m-t-20"></div>

js:

paypal.Button.render({
    env: '@Model.Env',
    locale: '@Model.CurrentCulture',
    style: {
        size: 'medium',
        height: 48,
        color: 'silver',
        shape: 'rect',
        label: 'checkout',
        tagline: 'true',
        fundingicons: 'true',
        layout: 'horizontal'
    },       

【问题讨论】:

    标签: css paypal


    【解决方案1】:

    如果您禁用资金来源,按钮将不会显示。请参阅 Paypal page

    我希望您想要的代码如下所示:

    <script src="https://paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&disable-funding=credit">
    </script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-14
      • 2012-09-29
      • 2022-11-15
      • 2017-11-06
      • 1970-01-01
      • 2017-05-12
      • 1970-01-01
      • 2021-10-19
      相关资源
      最近更新 更多