eBay Post-API API возвращает 500

Как работать с делами через 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 ответов

Другие вопросы по тегам