热门显示带有Paypal结帐的VISA和MASTERCARD按钮吗?

时间:2019-11-15 16:55:21

标签: javascript paypal paypal-sandbox checkout paypal-subscriptions

如何通过Paypal结帐显示VISA和MASTERCARD按钮?

喜欢此屏幕:

enter image description here

我正在使用Paypal结帐,我不知道为什么我的代码仅显示“ paypal”付款的按钮(所以我的帐户也是如此)。

paypal.Buttons({
    style: {
        layout: 'horizontal',
        fundingicons: 'true',
        size: 'responsive',
        color:  'gold',
        shape:  'pill',
        tagline: 'false'
    },
    funding: {
        disallowed: [paypal.FUNDING.CREDIT],
        allow: [paypal.FUNDING.CARD]
    },
    createOrder: function(data, actions) {
            return actions.order.create({
                purchase_units: [{
                    amount: {
                        currency_code: 'EUR',
                        value: '0.01'                   
                    }
                }]
            });
    },
    onApprove: function(data, actions) {
        // Capture the funds from the transaction
        return actions.order.capture().then(function(details) {
         //my code
        });
    }
}).render('#paypal-button-container'); 


<script src="https://www.paypal.com/sdk/js?client-id=xxx&currency=EUR"></script>

问题出在哪里?

0 个答案:

没有答案