贝宝付款(沙盒)回应MALFORMED_REQUEST_ERROR

时间:2018-08-30 12:44:38

标签: firebase paypal google-cloud-functions paypal-sandbox

我在我的项目中使用PayPal付款。创建付款时,我发现了一个问题。该请求是在Postman(Windows)和Node.js上使用axios(Firebase Functions)发出的。

我收到了关于此请求的回复MALFORMED_REQUEST_ERROR

POST https://api.sandbox.paypal.com/v1/payments/payouts

{
  "sender_payout_header": {
    "sender_batch_id": "2018083001",
    "email_subject": "You have a payout!"
  },
  "items": [
    {
      "recipient_type": "EMAIL",
      "amount": {
        "value": "9.87",
        "currency": "USD"
      },
      "note": "Thanks for your patronage!",
      "sender_item_id": "2018083001001",
      "receiver": "receiver@example.com"
    }
  ]
}

我尝试将items[0]/note更改为测试值:POSPYO001,API将按预期响应201 Created

为什么沙盒仅在正/负测试值上起作用?这是限制还是错误?

P.S。对不起,我的英语。

0 个答案:

没有答案