PayPal访客结账 - 错误

时间:2018-06-10 16:49:47

标签: node.js express paypal payment-gateway paypal-sandbox

我正在使用PayPal Express Checkout。它向用户显示通过访客结账使用PayPal或信用卡结账的选项。

https://developer.paypal.com/demo/checkout/#/pattern/buynow

有时,当用户尝试以PayPal来宾结账时,屏幕会重定向,但不会向用户收费。显然某种类型的付款问题,但PayPal显示没有错误通知。这给客户带来了令人难以置信的困惑,因为他们认为他们没有收费。

我的设置错了吗?

<script>

    // Render the PayPal button

    paypal.Button.render({

        // Set your environment

        env: 'production', // sandbox | production

        // Specify the style of the button

        style: {
            label: 'checkout',
            fundingicons: true, // optional
            branding: true, // optional
            size:  'medium', // small | medium | large | responsive
            shape: 'rect',   // pill | rect
            color: 'blue' // gold | blue | silve | black


        },

        // PayPal Client IDs - replace with your own
        // Create a PayPal app: 


        client: {
            sandbox:    'MY#',
            production: 'MY#'
        },

// Wait for the PayPal button to be clicked

        payment: function(data, actions) {

            // Make a client-side call to the REST api to create the payment

            return actions.payment.create({
                payment: {
                    transactions: [
                        {
                            amount: { total: '9.99', currency: 'USD' }
                        }
                    ]
                },

                experience: {
                    input_fields: {
                        no_shipping: 1
                    }
                }
            });
        },

        // Wait for the payment to be authorized by the customer
     commit: true,
        onAuthorize: function(data, actions) {

            // Execute the payment

            return actions.payment.execute().then(function() {
                $("#payWall").hide();
                $("#signUpForm").show();
            });
        }

    }, '#paypal-button-container');

</script>

0 个答案:

没有答案