PayPal API-在一个订单中设置多个货币

PayPal API-在一个订单中设置多个货币,paypal,paypal-rest-sdk,Paypal,Paypal Rest Sdk,我试图在一个订单中设置多个货币代码 我将此json发送到PayPal API,并随机分发了两个货币代码:欧元和美元 { "intent": "CAPTURE", "brand_name": "Miller-Miller", "cancel_url": "https://adkins-knight.biz/login/", "landing_page&q

我试图在一个订单中设置多个货币代码

我将此json发送到PayPal API,并随机分发了两个货币代码:欧元和美元

{
  "intent": "CAPTURE",
  "brand_name": "Miller-Miller",
  "cancel_url": "https://adkins-knight.biz/login/",
  "landing_page": "LOGIN",
  "return_url": "https://kennedy.net/",
  "shipping_preference": "NO_SHIPPING",
  "user_action": "PAY_NOW",
  "payer_email_address": "lindaholland@gmail.com",
  "payer_address_line_1": "98169 Tina Ramp Apt. 548",
  "payer_address_line_2": "Unions",
  "payer_admin_area_1": "United States Virgin Islands",
  "payer_admin_area_2": "South Veronicaborough",
  "payer_country_code": "BE",
  "payer_postal_code": "16858",
  "payer_full_name": "Jeremy Martin Jr.",
  "payer_given_name": "Sarah",
  "payer_middle_name": "Richard",
  "payer_prefix": "Dr.",
  "payer_suffix": "DDS",
  "payer_surname": "Donovan",
  "user": null,
  "purchase_units": [
    {
      "custom_id": "3cef9acd-acfd-4b57-9426-fe25b993b51f",
      "description": "Process would successful not stage girl.\nEat economy air stuff wind box city. Suffer scene deal much. Rise or friend provide.",
      "invoice_id": "0f2ac8bf-c763-48a2-8207-6c15a422cf44",
      "reference_id": "0ea30992-6cc2-4e3f-9f9f-bb2a1ff9458d",
      "soft_descriptor": "break",
      "amount_currency_code": "EUR",
      "amount_value": 9998008.45,
      "breakdown_discount_currency_code": "EUR",
      "breakdown_discount_value": 9999889.5,
      "breakdown_handling_currency_code": "USD",
      "breakdown_handling_value": 9999884.8,
      "breakdown_insurance_currency_code": "EUR",
      "breakdown_insurance_value": 9997223.61,
      "breakdown_item_total_currency_code": "USD",
      "breakdown_item_total_value": 9994971.56,
      "breakdown_shipping_currency_code": "USD",
      "breakdown_shipping_value": 9991250.62,
      "breakdown_shipping_discount_currency_code": "USD",
      "breakdown_shipping_discount_value": 9997344.57,
      "breakdown_tax_total_currency_code": "USD",
      "breakdown_tax_total_value": 9999229.59,
      "shipping_type": "SHIPPING",
      "shipping_address_line_1": "2359 Greene Path Suite 645",
      "shipping_address_line_2": "Springs",
      "shipping_admin_area_1": "Hong Kong",
      "shipping_admin_area_2": "South Debra",
      "shipping_country_code": "CU",
      "shipping_postal_code": "95591",
      "shipping_full_name": "Ashley Stone",
      "items": [
        {
          "category": "PHYSICAL_GOODS",
          "description": "Despite should allow. Military determine up she goal.",
          "name": "Mary Harper",
          "quantity": 4405,
          "sku": "total",
          "tax_currency_code": "USD",
          "tax_value": 9997113.36,
          "unit_amount_currency_code": "USD",
          "unit_amount_value": 9998795.33
        },
        {
          "category": "PHYSICAL_GOODS",
          "description": "Hospital cover job rest new. Only citizen I generation raise present. Majority president stuff west.",
          "name": "Lucas Parker",
          "quantity": 1759,
          "sku": "little",
          "tax_currency_code": "USD",
          "tax_value": 9996456.8,
          "unit_amount_currency_code": "USD",
          "unit_amount_value": 9999554.88
        }
      ]
    }
  ]
}
我得到的回答是:

{
  "name": "UNPROCESSABLE_ENTITY",
  "details": [
    {
      "issue": "MULTI_CURRENCY_ORDER",
      "description": "Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code."
    }
  ],
  "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
  "debug_id": "527aca32094a2",
  "links": [
    {
      "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MULTI_CURRENCY_ORDER",
      "rel": "information_link",
      "method": "GET"
    }
  ]
}
我在PayPal文档和Google上搜索过,但不清楚是否可以在一个订单中设置两种或更多的货币

插入的货币(欧元和美元)均在我的PayPal设置中获得批准,以下是PayPal常见问题解答:

编辑:
如果我需要在一次交易中设置多个产品和两种货币,我不能这样做吗?我是否将订单分为两个顺序,为每个顺序应用单一货币代码?

不支持多个不同的货币代码值。整个订单请求必须具有相同的货币代码。

谢谢@Preston,您仅从PayPal response复制了此消息。如果我需要在一个事务中设置多个不同币种的产品,我不能这样做吗?我是否在两个订单中执行单独的订单,为每个订单应用单一货币代码?如果必须使用单独的货币,则交易必须是单独的。