【问题标题】:item_option_selection - Where to put in the json request?item_option_selection - 将 json 请求放在哪里?
【发布时间】:2018-02-14 23:33:02
【问题描述】:

我在文档中看到有一种设置项目选项的方法:https://developer.paypal.com/docs/api/payments/#definition-item_option_selection

我在贝宝的例子中究竟应该把它放在哪里?我没有找到有关贝宝开发人员文档的示例或任何说明

{
  "intent": "sale",
  "payer": {
  "payment_method": "paypal"
  },
  "transactions": [
  {
    "amount": {
    "total": "30.11",
    "currency": "USD",
    "details": {
      "subtotal": "30.00",
      "tax": "0.07",
      "shipping": "0.03",
      "handling_fee": "1.00",
      "shipping_discount": "-1.00",
      "insurance": "0.01"
    }
    },
    "description": "The payment transaction description.",
    "custom": "EBAY_EMS_90048630024435",
    "invoice_number": "48787589673",
    "payment_options": {
    "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
    },
    "soft_descriptor": "ECHI5786786",
    "item_list": {
    "items": [
      {
      "name": "hat",
      "description": "Brown hat.",
      "quantity": "5",
      "price": "3",
      "tax": "0.01",
      "sku": "1",
      "currency": "USD"
      },
      {
      "name": "handbag",
      "description": "Black handbag.",
      "quantity": "1",
      "price": "15",
      "tax": "0.02",
      "sku": "product34",
      "currency": "USD"
      }
    ],
    "shipping_address": {
      "recipient_name": "Brian Robinson",
      "line1": "4th Floor",
      "line2": "Unit #34",
      "city": "San Jose",
      "country_code": "US",
      "postal_code": "95131",
      "phone": "011862212345678",
      "state": "CA"
    }
    }
  }
  ],
  "note_to_payer": "Contact us for any questions on your order.",
  "redirect_urls": {
  "return_url": "https://www.paypal.com/return",
  "cancel_url": "https://www.paypal.com/cancel"
  }
}'

【问题讨论】:

    标签: javascript json paypal paypal-rest-sdk


    【解决方案1】:

    该对象不再是 Paypal REST api 的一部分。它很快就会被删除

    参考:https://github.com/paypal/PayPal-REST-API-issues/issues/137

    【讨论】:

      猜你喜欢
      • 2021-04-28
      • 2015-03-20
      • 2019-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-02
      • 2011-08-29
      相关资源
      最近更新 更多