davidtsadler / ebay-sdk-examples

Several examples of using the eBay SDK for PHP
http://devbay.net
Apache License 2.0
184 stars 100 forks source link

CategoryID in CustomCategory appears to be type int, but categories are frequently over 2147483647 #31

Closed timramseyjr closed 7 years ago

timramseyjr commented 7 years ago

I am trying to retrieve the custom store categories with something like:

$service = new Services\TradingService([
    'credentials' => $config['production']['credentials'],
    'siteId'      => Constants\SiteIds::US
]);
$request = new Types\GetStoreRequestType();
$request->RequesterCredentials = new Types\CustomSecurityHeaderType();
$request->RequesterCredentials->eBayAuthToken = $config['production']['authToken'];
$response = $service->getStore($request);
if ($response->Ack !== 'Failure') {
    $store = $response->Store;
    foreach ($store->CustomCategories->CustomCategory as $category) {
        $category->CategoryID
    }
}

but $category->CategoryID is coming up as 2147483647 for over 1/2 of the categories. I assume because its type is defined as int?

davidtsadler commented 7 years ago

It's because you are using a 32 bit system as documented in this guide http://devbay.net/sdk/guides/getting-started/requirements.html#using-the-sdk-with-32-bit-systems