易趣后期订单API返回500

时间:2016-06-07 04:03:05

标签: php ebay-api

如何通过Post Order API处理案例? 如果我无法接收数据信息,如何获取活动???

 public function __construct($token)
{
    $this->client = new GuzzleHttp\Client([
        'verify' => false,
        'timeout' => 30,
        'http_errors' => false,
        'headers' => [
            'Authorization' => 'TOKEN '.$token,
            'X-EBAY-C-MARKETPLACE-ID' => 'EBAY-US',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json'
        ]
    ]);

    $this->url = (env('EBAY_SANDBOX', true)) ? 'https://api.sandbox.ebay.com/post-order/v2/' : 'https://api.ebay.com/post-order/v2/';
}


 public function getCase($caseid)
{
    $result = $this->client->request('GET', $this->url . 'casemanagement/'.$caseid);
    return ($result->getStatusCode() == 200) ? json_decode($result->getBody()->getContents(), 1) : null;
}

我通过getUserCases获取案例列表(并尝试使用Post-Order API接收信息)

获取: https://api.ebay.com/post-order/v2/casemanagement/ $ id

Response {#284 ▼
  -reasonPhrase: "Internal Server Error"
  -statusCode: 500
  -headers: array:13 [▼
    "content-length" => array:1 [▶]
    "date" => array:1 [▶]
    "nncoection" => array:1 [▶]
    "rlogid" => array:1 [▼
      0 => "t6q%60uhbuv%3D9vjd6g65%60%28%6017a%28twwgsvv%28tof%28bad%7F%29%60jk-15528f7a2e2-0x10e"
    ]
    "set-cookie" => array:5 [▶]
    "x-content-type-options" => array:1 [▶]
    "x-ebay-c-request-id" => array:1 [▼
      0 => "ri=WoIxWEQIbW06,rci=ziaY%2BD9t56BJUIRu"
    ]
    "x-ebay-c-version" => array:1 [▶]
    "x-ebay-request-id" => array:1 [▼
      0 => "15528f7a2c5.a883524.63fb3.f889cc65!/post-order/v2/casemanagement!10.136.53.36!r1esbngcos[]!post-order.v2!r1resoapp[]"
    ]
    "x-frame-options" => array:1 [▼
      0 => "SAMEORIGIN"
    ]
    "x-xss-protection" => array:1 [▼
      0 => "1; mode=block"
    ]
    "content-type" => array:1 [▶]
    "connection" => array:1 [▶]
  ]
  -headerLines: array:13 [▶]
  -protocol: "1.1"
  -stream: Stream {#282 ▶}
}

回答我的问题: 案例类型SNAD(非关闭状态)需要通过函数 GetReturn (PostOrderAPI)收到 案例类型INR(未克隆状态)需要接收功能 GetCase (PostOrderAPI)

0 个答案:

没有答案