davidtsadler / ebay-sdk-php

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

how to use Fulfillment getOrders? #152

Closed hlb-schmidt closed 7 years ago

hlb-schmidt commented 7 years ago

heres what i tried:

$api = new \DTS\eBaySDK\Sdk([
    "sandbox" => true,
    "credentials" => [
        "appId" => $acnt["app_id"],
        "devId" => $acnt["dev_id"],
        "certId" => $acnt["cert_id"]
    ]
]);

$wat = $api->createFulfillment();
$wat->getOrders();

but get an InvalidArgumentException Missing required configuration options: authorization

michabbb commented 7 years ago

take a look to the examples, i.e.

https://github.com/davidtsadler/ebay-sdk-examples/blob/master/trading/11-get-my-ebay-selling.php#L43

https://github.com/davidtsadler/ebay-sdk-examples/blob/master/configuration.php.example

davidtsadler commented 7 years ago

The Fulfillment API uses the new RESTful token for authorization. You need to pass you oAuth token via the authorization configuration option.

More info on using the SDK with the RESTful services can be found in the documentation.

There are also several examples available.

https://github.com/davidtsadler/ebay-sdk-examples/blob/master/inventory/01-get-inventory-item.php https://github.com/davidtsadler/ebay-sdk-examples/blob/master/browse/01-search-for-items.php https://github.com/davidtsadler/ebay-sdk-examples/blob/master/feed/01-get-item-feed.php

hlb-schmidt commented 7 years ago

thank you for the tip about (soap) trading api. that works without user intervention (as i need to use this in a cronjob) and a single seller token that only has to be created once a year. versus rest/fulfillment api where it seems we need manual user grants and short lasting tokens...