davidtsadler / ebay-sdk-php

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

add solution for get orders, from all marketplaces #92

Closed dewalt201 closed 7 years ago

davidtsadler commented 7 years ago

Closing this PR. Apologies for not looking at it sooner. Sadly the changes result in the unit tests failing. The tests can be ran from the command line with make test or vendor/bin/phpunit.

In addition I'm not sure what the changes are meant to achieve. The following will not work with the SDK or the API.

$trading = new DTS\eBaySDK\Trading\Services\TradingService([
    'siteId'   => [100, 3] 
]);
// Get orders from multiple sites.
$trading->getOrders($request);

The API will only direct a request to a single site. If you need to make a call to multiple sites you are going to have to do something along the lines of the below.

$sites = [100, 3];
foreach($sites as $site) {
    $trading = new DTS\eBaySDK\Trading\Services\TradingService([
        'siteId'   => $site
    ]);
    $trading->getOrders($request);
}