Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

500 Internal Server Error issue #33

Closed
patrioticcow opened this issue Feb 24, 2017 · 2 comments
Closed

500 Internal Server Error issue #33

patrioticcow opened this issue Feb 24, 2017 · 2 comments

Comments

@patrioticcow
Copy link

Here is my code

require BASE_PATH . 'common/scripts/php/ebay-sdk/ebay-sdk-php-autoloader.php';

$service = new DTS\eBaySDK\Finding\Services\FindingService([
    'credentials' => [
        'appId'  => '............................',
        'devId'  => '............................',
        'certId' => '........................',
    ],
    'globalId'    => DTS\eBaySDK\Constants\GlobalIds::US
]);

try {
    $request           = new \DTS\eBaySDK\Finding\Types\FindItemsByKeywordsRequest();
    $request->keywords = 'Harry Potter';

    $response          = $service->findItemsByKeywords($request);
    var_dump($response);
} catch (Exception $e) {
    echo($e);
}

Here is the error I'm getting

exception 'GuzzleHttp\Exception\ServerException' with message 'Server error: POST https://svcs.ebay.com/services/search/FindingService/v1` resulted in a 500 Internal Server Error response: run() #5 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/GuzzleHttp/Handler/CurlMultiHandler.php(123): GuzzleHttp\Handler\CurlMultiHandler->tick() #6 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/GuzzleHttp/Promise/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true) #7 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/GuzzleHttp/Promise/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() #8 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/GuzzleHttp/Promise/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() #9 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/GuzzleHttp/Promise/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() #10 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #11 /home/webdev/cristi.vehiclehistory.com/common/scripts/php/ebay-sdk/DTS/eBaySDK/Finding/Services/FindingService.php(53): GuzzleHttp\Promise\Promise->wait() #12 /home/webdev/cristi.vehiclehistory.com/backend/test.php(25): DTS\eBaySDK\Finding\Services\FindingService->findItemsByKeywords(Object(DTS\eBaySDK\Finding\Types\FindItemsByKeywordsRequest)) #13 {main}`

I'm using the latest code, as of now. Any ideas?

@davidtsadler
Copy link
Owner

Make sure that you are using your production credentials. Sandbox and production credentials are not interchangeable and eBay sends a HTTP status of 500 if you are using the wrong ones.

@patrioticcow
Copy link
Author

Thanks. Looks like If i use the Production credentials, I get pass that error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants