我按照本教程在我的市场上启用PayPal:https://developer.paypal.com/docs/business/checkout/set-up-standard-payments/
所以,我写这段代码:
<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'
},
}],
});
},
这一项工作正常,但是当我要添加platform_fee时,PayPal返回422(不可处理实体):
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'
}
}]
},
}],
});
},
如何通过PayPal Checkout收取平台费? 谢谢您的帮助
答案 0 :(得分:1)
除非您是经过批准的PayPal合作伙伴,否则您不能使用platform_fee