【问题标题】:Shopify Api working with PHPShopify Api 使用 PHP
【发布时间】:2017-03-10 11:04:37
【问题描述】:

我正在使用 Shopify Webhook 进行订单履行(在 PHP 中),现在我想要 Shopify 管理员中提供的“来自网关的信息”的付款详细信息,但未显示在 Webhook 详细信息中,因此任何人都可以提供任何解决方案这。以下是我要整理的详细信息的屏幕截图。

以下是我在确认任何新订单时想要的详细信息:

1) 授权密钥

2) 信用卡上的姓名

3) 到期月份

4) 有效期

details which i want to get in order

【问题讨论】:

    标签: php shopify


    【解决方案1】:

    对于这些信息,您需要使用以下 shopify 方法

    GET /admin/orders/#{id}/transactions.json
    

    您会得到以下回复:

    HTTP/1.1 200 OK
    {
      "transactions": [
        {
          "id": 179259969,
          "order_id": 450789469,
          "amount": "209.00",
          "kind": "refund",
          "gateway": "bogus",
          "status": "success",
          "message": null,
          "created_at": "2005-08-05T12:59:12-04:00",
          "test": false,
          "authorization": "authorization-key",
          "currency": "USD",
          "location_id": null,
          "user_id": null,
          "parent_id": null,
          "device_id": null,
          "receipt": {},
          "error_code": null,
          "source_name": "web"
        },
        {
          "id": 389404469,
          "order_id": 450789469,
          "amount": "409.94",
          "kind": "authorization",
          "gateway": "bogus",
          "status": "success",
          "message": null,
          "created_at": "2005-08-01T11:57:11-04:00",
          "test": false,
          "authorization": "authorization-key",
          "currency": "USD",
          "location_id": null,
          "user_id": null,
          "parent_id": null,
          "device_id": null,
          "receipt": {
            "testcase": true,
            "authorization": "123456"
          },
          "error_code": null,
          "source_name": "web",
          "payment_details": {
            "credit_card_bin": null,
            "avs_result_code": null,
            "cvv_result_code": null,
            "credit_card_number": "•••• •••• •••• 4242",
            "credit_card_company": "Visa"
          }
        },
        {
          "id": 801038806,
          "order_id": 450789469,
          "amount": "250.94",
          "kind": "capture",
          "gateway": "bogus",
          "status": "success",
          "message": null,
          "created_at": "2005-08-05T10:22:51-04:00",
          "test": false,
          "authorization": "authorization-key",
          "currency": "USD",
          "location_id": null,
          "user_id": null,
          "parent_id": null,
          "device_id": null,
          "receipt": {},
          "error_code": null,
          "source_name": "web"
        }
      ]
    }
    

    如果您想了解更多详情,请参阅以下链接:

    https://help.shopify.com/api/reference/transaction
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-12
      相关资源
      最近更新 更多