【问题标题】:How to change color of Pay Button in Stripe Pop-up?如何更改条纹弹出窗口中支付按钮的颜色?
【发布时间】:2017-02-21 01:21:41
【问题描述】:

我在我的潜在客户页面中使用 Stripe 付款方式,它运作良好。我只想更改支付按钮的颜色,如附图所示。

这是用于显示弹出窗口的代码

<script>
    var handler = StripeCheckout.configure({
        key: '[KEY]',
        image: 'https://www.emotionacademy.com.au/images/emotion-academy-logo.png',
        locale: 'auto',
        token: function(token) {
            $( "#stripeToken" ).val( token.id);
            $( "#stripeEmail" ).val( token.email);
            $( "#paymentForm" ).submit();
        }
    });

        $( ".btn-price-table" ).click(function(event) {
            var price = $(this).closest('.pricing-table').find('.price span').text()*100;
            var title = $(this).closest('.pricing-table').find('.pricing-title').text().toUpperCase();

            handler.open({
                name: title,
                description: '',
                zipCode: true,
                currency: 'aud',
                amount: price
            });
            event.preventDefault();
        });
</script>

【问题讨论】:

    标签: jquery html popup stripe-payments


    【解决方案1】:

    很遗憾,你不能。 Checkout跑进了自己的安全iframe,此时没有configuration option可以自定义按钮的颜色。

    【讨论】:

    • 有趣的是,他们似乎在使用“图像”来生成用于小图标(如卡号字段中的小卡片)的颜色。他们也可以将其用于按钮颜色...
    猜你喜欢
    • 2016-08-02
    • 2021-10-14
    • 2017-07-03
    • 1970-01-01
    • 2015-02-23
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    相关资源
    最近更新 更多