davidtsadler / ebay-sdk-php

An eBay SDK for PHP. Use the eBay API in your PHP projects.
Apache License 2.0
350 stars 344 forks source link

Getting 500 Response #4

Closed raheelkhan closed 9 years ago

raheelkhan commented 9 years ago

I am just trying to use this sdk and following the Getting Started Guide that show code for FindItemsByKeywordsRequest

Here is the code i used:

<?php
use \DTS\eBaySDK\Finding\Services;
use \DTS\eBaySDK\Finding\Types;
use \DTS\eBaySDK\Constants;

    public function __construct($app_id)
    {
        $this->api['app_id'] = $app_id;
        $service = new Services\FindingService(array(
            'appId' => $this->api['app_id'],
            'globalId' => Constants\GlobalIds::US,
            'sandbox' => true
        ));
        // Create the API request object.
        $request = new Types\FindItemsByKeywordsRequest();
        $request->keywords = 'Harry Potter';
        $request->sortOrder = 'CurrentPriceHighest';
        $response = $service->findItemsByKeywords($request);
        dd($response);
    }

I am getting following error Call to a member function attachment() on a non-object' in /var/www/html/myproject/vendor/dts/ebay-sdk-php/src/DTS/eBaySDK/Services/BaseService.php:186

I dig more into it and tried to see the response of the Guzzle Request on BaseService.php:177 by doing a die construct and when running the script, It opens a ebay page that says:

This page may have moved or is no longer available.

davidtsadler commented 9 years ago

The sandbox for the Finding API is currently not working.

http://svcs.sandbox.ebay.com/services/search/FindingService/v1

I've opened a support ticket with eBay so that they can resolve it. No word at the moment as to when this will be done.

I'll keep this issue open for the time been in case anyone else hits the same problem.

davidtsadler commented 9 years ago

Looks like the sandbox for the Finding API is now working.