首页 > 解决方案 > 我们可以使用 Shopify 请求属性部分 API 添加其他参数吗?

问题描述

我开发了一个带有支付扩展的 Shopify APP,想问一下我们是否可以在请求属性部分(https://shopify.dev/apps/payments/processing-a-payment)设置额外的自定义参数。

这是示例代码,我添加了额外的参数,例如 "merchant_key" : "12345"

可行吗?

任何意见都非常感谢

 {
  "id": "8BLFxjEHP5PkA1kNsb6iRKX9",
  "merchant_key" : "12345"
  "gid": "gid://shopify/PaymentSession/8BLFxjEHP5PkA1kNsb6iRKX9",
  "group": "W_CUXwaUd69aOjMMlWOui7eK",
  "amount": "123.00",
  "currency": "CAD",
  "test": false,
  "merchant_locale": "en",
  "payment_method": {
    "type": "offsite",
    "data": {
      "cancel_url": "https://my-test-shop.com/1/checkouts/4c94d6f5b93f726a82dadfe45cdde432"
    }
  },
  "proposed_at": "2020-07-13T00:00:00Z",
  "customer": {
    "billing_address": {
      "given_name": "Alice",
      "family_name": "Smith",
      "line1": "123 Street",
      "line2": "Suite B",
      "city": "Montreal",
      "postal_code": "H2Z 0B3",
      "province": "Quebec",
      "country_code": "CAN",
      "company": ""
    },
    "shipping_address": {
      "given_name": "Alice",
      "family_name": "Smith",
      "line1": "123 Street",
      "line2": "Suite B",
      "city": "Montreal",
      "postal_code": "H2Z 0B3",
      "province": "Quebec",
      "country_code": "CAN",
      "company": ""
    },
    "email": "buyer@example.com",
    "phone_number": "5555555555",
    "locale": "fr",
    "kind": "sale"
  }
}

标签: shopify

解决方案


推荐阅读