【问题标题】:Paypal express checkout integration security issuePaypal 快速结帐集成安全问题
【发布时间】:2017-12-01 11:34:33
【问题描述】:

here 所述,有 3 种方式来执行和创建付款

  1. 客户端 REST
  2. 服务器端 REST
  3. Braintree SDK

我们使用的是客户端 REST。 在他们的网站上找到代码集成:

paypal.Button.render({

        env: 'sandbox', // sandbox | production

        // PayPal Client IDs - replace with your own
        // Create a PayPal app: https://developer.paypal.com/developer/applications/create
        client: {
            sandbox:    'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
            production: '<insert production client id>'
        },

        // Show the buyer a 'Pay Now' button in the checkout flow
        commit: true,

        // payment() is called when the button is clicked
        payment: function(data, actions) {

            // Make a call to the REST api to create the payment
            return actions.payment.create({
                transactions: [
                    {
                        amount: { total: '0.01', currency: 'USD' }
                    }
                ]
            });
        },

        // onAuthorize() is called when the buyer approves the payment
        onAuthorize: function(data, actions) {

            // Make a call to the REST api to execute the payment
            return actions.payment.execute().then(function() {
                window.alert('Payment Complete!');
            });
        }

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

这样安全吗?

client: {
            sandbox:    'AZDxjDScFpQtjWTOUtWKbyN_bDt4OgqaF4eYXlewfBP4-8aqX3PiV8e1GWU6liB2CUXlkA59kJXE7M6R',
            production: '<insert production client id>'
        },

我们在客户端公开我们的客户端 ID,其他人可能能够获取和使用它。

感谢和更多的力量

【问题讨论】:

  • 我也担心amount: { total: '0.01', currency: 'USD' } 行。有人可以在结帐前更改价格吗?

标签: javascript paypal


【解决方案1】:

似乎没有人回答这个问题,并且可能是其他一些人搜索过这个问题。 好吧,其他人在评论中回答了这个问题,这里是同一个问题 paypal express checkout security with cilent ajax call

【讨论】:

    猜你喜欢
    • 2018-03-25
    • 2011-12-12
    • 2021-07-23
    • 2013-09-28
    • 2017-09-11
    • 2014-12-07
    • 2013-03-05
    • 2017-11-22
    • 2011-08-10
    相关资源
    最近更新 更多