hkonnet / laravel-ebay

This package for laravel framework to access Ebay.
MIT License
40 stars 42 forks source link

Server error: `POST https://svcs.sandbox.ebay.com/services/search/FindingService/v1` #8

Closed inzamam-idrees closed 5 years ago

inzamam-idrees commented 5 years ago

I got the error while fetching the products using keyword.

// Create the service object. $ebay_service = new EbayServices(); $service = $ebay_service->createFinding();

// Assign the keywords.
$request = new Types\FindItemsByKeywordsRequest();
$request->keywords = 'Harry Potter';

// Ask for the first 25 items.
$request->paginationInput = new Types\PaginationInput();
$request->paginationInput->entriesPerPage = 25;
$request->paginationInput->pageNumber = 1;

// Ask for the results to be sorted from high to low price.
$request->sortOrder = 'CurrentPriceHighest';

$response = $service->findItemsByKeywords($request);
dd($response);

I am putting the right credentials for sandbox as well as production in ebay.php. And these credentials tested online for developer account.

but in application i got this error: Server error: POST https://svcs.sandbox.ebay.com/services/search/FindingService/v1 resulted in a 500 Internal Server Error response: <?xml version='1.0' encoding='UTF-8'?><e (truncated...)

How do I fix it?

hkonnet commented 5 years ago

Hi Inzimam, here is the issue you can follow this thread https://github.com/davidtsadler/ebay-sdk-examples/issues/8

inzamam-idrees commented 5 years ago

I read all of the discussion, the owner of sdk said that it is the error of version number or appId key mistakes. But in my situation these are correct. But still error occur for those production and sandbox environment. But when using the same keys and apiversion for both sandbox and production environment I got the right response while testing in the developer account.

inzamam-idrees commented 5 years ago

Please update dts/ebay-sdk-php version 15.0 to 18.0 in your composer.json file

hkonnet commented 5 years ago

@inzamam-idrees https://github.com/hkonnet/laravel-ebay/issues/2 Check this as well.. Try production keys..

inzamam-idrees commented 5 years ago

Now it's working for me for both sandbox as well as production keys. Thanks for your time