Javascript PayPal结账-创建订单时的平台费用
我遵循本教程在我的市场上启用PayPal: 因此,我编写了以下代码:Javascript PayPal结账-创建订单时的平台费用,javascript,paypal,paypal-sandbox,paypal-rest-sdk,fee,Javascript,Paypal,Paypal Sandbox,Paypal Rest Sdk,Fee,我遵循本教程在我的市场上启用PayPal: 因此,我编写了以下代码: <script src="https://www.paypal.com/sdk/js?client-id=xxxxxxxxxxx"></script> createOrder: function(data, actions) { return actions.order.create({ purchase_units: [{ amou
<script src="https://www.paypal.com/sdk/js?client-id=xxxxxxxxxxx"></script>
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '{{ course.price / 100 }}',
currency: 'EUR'
},
payee: {
merchant_id: '3SBUTQHGTMHWS'
},
}],
});
},
如何使用PayPal收银台收取平台费用?
感谢您的帮助您不能使用
平台费用
,除非您是经批准的PayPal合作伙伴即使使用sandbox?即使使用sandbox。PayPal需要为您设置一个具有所需范围的沙箱帐户,这是为合作伙伴完成的
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '{{ course.price / 100 }}',
currency: 'EUR'
},
payee: {
merchant_id: '3SBUTQHGTMHWS'
},
payment_instruction: {
disbursement_mode: 'INSTANT',
platform_fees: [{
amount: {
currency_code: 'EUR',
value: '3'
}
}]
},
}],
});
},