0

我按照本教程在我的市场上启用 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 收取平台费用?谢谢你的帮助

4

1 回答 1

1

platform_fee除非您是经批准的 PayPal 合作伙伴,否则无法使用

于 2020-08-18T03:24:43.653 回答