小编Mar*_*ino的帖子

Paypal - 拆分付款并将其发送到不同的 PayPal 帐户

我的目标是获得金额的 5% 并将其发送到公司 PayPal 帐户,其余 95% 将直接发送到其他用户的 Paypal。我怎样才能在 PayPal 代码中做到这一点?

这是我的贝宝代码。

paypal.Button.render({
    style: {
        size: 'responsive',
        color: 'black'
    },
    env: 'sandbox', // 'sandbox' Or 'production',
    client: {
        sandbox: 'MyClientID',
        production: ''
    },
    locale: 'en_US',
    commit: true, // Show a 'Pay Now' button
    payment: function(data, actions) {
    // Set up the payment here
    return actions.payment.create({
        payment: {
            transactions: [{
                amount: { total: '1.00', currency: 'USD' }
            }]
        }
    });
},
onAuthorize: function(data, actions) {
    // Execute the payment here
    return actions.payment.execute().then(function(payment) …
Run Code Online (Sandbox Code Playgroud)

javascript paypal

7
推荐指数
1
解决办法
5325
查看次数

标签 统计

javascript ×1

paypal ×1