Code Monkey home page Code Monkey logo

ebay-sdk-examples's People

Contributors

jproof avatar richbradshaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ebay-sdk-examples's Issues

Explanation how to store credentials in another place

Hi,

I wonder how to tell my script to use a configuration file that is in another place than default.

CredentialsProvider.php

    /**
     * Provider that creates credentials using an ini file stored in the
     * current user's home directory.
     *
     * @param string|null $profile Profile to use. Defaults to "default".
     * @param string|null $filename If provided, uses a custom filename rather than
     * looking in the home directory for the current user.
     *
     * @return callable
     * @throws \InvalidArgumentException
     */
    public static function ini($profile = null, $filename = null)
    {
        $filename = $filename ?: (self::getHomeDir() . '/.ebay_sdk/credentials');

To be more precise, it would help a lot to know how to pass parameters to this ini function so that I could use credentials from any place relative to the current script call.

No unity between classes

There is no unity between the classes of the responses.. for example: the response of SimpleItemType returns ItemID while the response of SearchItem returns itemId.. so if you want to create for example a product list from both SimpleItemType and SearchItem you need to do double work...

Thanks in advance,
Din.

Error 500 with oAuth only on SDK > BulkDataExchange > createUploadJob

Hi David

I am getting the authentication error when using the oAuth token. Auth N Auth works fine so the sandbox credentials in config are good. Are there any configurations to be set in "SDK" class other than:

$sdk = new Sdk([ 'credentials' => $this->config[$this->mode_creds]['credentials'], 'authToken' => $user_token, 'sandbox' => $this->mode_flag, ]);

Error:
<errorMessage xmlns="http://www.ebay.com/marketplace/services"><error><errorId>11002</errorId><domain>Security</domain><severity>Error</severity><category>System</category><message>Authentication failed : Validation of the authentication token in API request failed.</message><subdomain>Authentication</subdomain><parameter name="Param1">Validation of the authentication token in API request failed.</parameter></error></errorMessage>

Many thanks in advance.
Adam

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ServerException' with message 'Server error: `POST https://svcs.ebay.com/services/sellerinventory/v1/BundleManagementService` resulted in a `500 Internal Server Error` response:

is this part of the API deprecated?

  • no info or help on how to create bundles via ebay webinterface anywhere

  • here the API example does not work (double checked production credentials, reissued as well)
    `/**

  • Create the service object.
    */
    $service = new Services\RelatedItemsManagementService([
    'credentials' => $config['production']['credentials'],
    'authToken' => $config['production']['authToken'],
    'globalId' => Constants\GlobalIds::DE,
    'sandbox' => false
    ]);`

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ServerException' with message 'Server error: POST https://svcs.ebay.com/services/sellerinventory/v1/BundleManagementService resulted in a 500 Internal Server Error response:

ShippingServiceDdetails

Hi, I am trying to upload the products and they are working except:

Add Items Warning: (21916215) Your previously selected shipping service has been modified or removed. The proposed shipping service was therefore selected.
Your previously selected shipping service has been changed or removed. The proposed shipping service was therefore selected.

Add Items Warning: (21916711) The information on the return can not be used.
The information in the field on your return conditions Refund has been ignored (2121824)

Add Items Warning: (21916711) The information on the return can not be used.
The information in the field on your ReturnWithin return conditions has been ignored. (2121824)

shipping service is the most important, because it is not writing the correct details!

Save as Draft

I searched quite a bit but couldn't find how to save a fixed price listing as draft which I manually verify and then publish? Is that even possible using the API/

Thanks a lot for creating this amazingly helpfull SDK.

Shipping Cost not returned in findCompletedItems if SearchItem->shippingInfo->shippingType = Calculated

I am getting the results of a findCompletedItemsRequest and I was going through the results and I noticed some of the shipping costs were not being added to the total price as my code does. I combed through the data and found that any SearchItem that is returned with shippingInfo->shippingType = Calculated there is no shippingServiceCost->value. Does anyone know how to get the cost of shipping for these items? Please see example below -

SearchItem {#1589 ▼
  -values: array:18 [▼
    "itemId" => "202262248525"
    "title" => "2008 coffee mug Starbucks 18 oz. HOUSTON White & Blue Magnolia city Architecture"
    "globalId" => "EBAY-US"
    "primaryCategory" => Category {#1604 ▼
      -values: array:2 [▼
        "categoryId" => "10795"
        "categoryName" => "Starbucks"
      ]
      -attachment: array:2 [▶]
    }
    "galleryURL" => "http://thumbs2.ebaystatic.com/m/mnMWUd_Jf5F7zGqet648Iag/140.jpg"
    "viewItemURL" => "http://www.ebay.com/itm/2008-coffee-mug-Starbucks-18-oz-HOUSTON-White-Blue-Magnolia-city-Architecture-/202262248525"
    "paymentMethod" => RepeatableType {#1603 ▼
      -data: array:1 [▼
        0 => "PayPal"
      ]
      -position: 0
      -class: "DTS\eBaySDK\Finding\Types\SearchItem"
      -property: "paymentMethod"
      -expectedType: "string"
    }
    "autoPay" => true
    "postalCode" => "66223"
    "location" => "Overland Park,KS,USA"
    "country" => "US"
    "shippingInfo" => ShippingInfo {#1605 ▼
      -values: array:5 [▼
        "shippingType" => "Calculated"
        "shipToLocations" => RepeatableType {#1608 ▼
          -data: array:1 [▼
            0 => "Worldwide"
          ]
          -position: 0
          -class: "DTS\eBaySDK\Finding\Types\ShippingInfo"
          -property: "shipToLocations"
          -expectedType: "string"
        }
        "expeditedShipping" => true
        "oneDayShippingAvailable" => false
        "handlingTime" => 3
      ]
      -attachment: array:2 [▶]
    }
    "sellingStatus" => SellingStatus {#1606 ▼
      -values: array:3 [▼
        "currentPrice" => Amount {#1607 ▼
          -values: array:2 [▼
            "currencyId" => "USD"
            "value" => 5.6
          ]
          -attachment: array:2 [▼
            "data" => null
            "mimeType" => null
          ]
        }
        "convertedCurrentPrice" => Amount {#1610 ▼
          -values: array:2 [▼
            "currencyId" => "USD"
            "value" => 5.6
          ]
          -attachment: array:2 [▶]
        }
        "sellingState" => "EndedWithSales"
      ]
      -attachment: array:2 [▶]
    }
    "listingInfo" => ListingInfo {#1609 ▼
      -values: array:6 [▼
        "bestOfferEnabled" => true
        "buyItNowAvailable" => false
        "startTime" => DateTime @1521143134 {#1611 ▼
          date: 2018-03-15 19:45:34.0 +00:00
        }
        "endTime" => DateTime @1524022008 {#1613 ▼
          date: 2018-04-18 03:26:48.0 +00:00
        }
        "listingType" => "FixedPrice"
        "gift" => false
      ]
      -attachment: array:2 [▶]
    }
    "returnsAccepted" => false
    "condition" => Condition {#1614 ▼
      -values: array:2 [▼
        "conditionId" => 1000
        "conditionDisplayName" => "New"
      ]
      -attachment: array:2 [▼
        "data" => null
        "mimeType" => null
      ]
    }
    "isMultiVariationListing" => false
    "topRatedListing" => false
  ]
  -attachment: array:2 [▼
    "data" => null
    "mimeType" => null
  ]
}

vs one with the shippingServiceCost->value field -

SearchItem {#1574 ▼
  -values: array:17 [▼
    "itemId" => "182823719658"
    "title" => "deleted 4116e42a-620d-47c1-81ce-2bd13752cd1e"
    "globalId" => "EBAY-US"
    "primaryCategory" => Category {#1577 ▶}
    "galleryURL" => "http://thumbs3.ebaystatic.com/m/m0WfTWMbOCw8_HQSi-3vfdg/140.jpg"
    "viewItemURL" => "http://www.ebay.com/itm/deleted-4116e42a-620d-47c1-81ce-2bd13752cd1e-/182823719658"
    "paymentMethod" => RepeatableType {#1576 ▶}
    "autoPay" => true
    "location" => "USA"
    "country" => "US"
    "shippingInfo" => ShippingInfo {#1579 ▼
      -values: array:6 [▼
        "shippingServiceCost" => Amount {#1580 ▼
          -values: array:2 [▼
            "currencyId" => "USD"
            "value" => 0.0
          ]
          -attachment: array:2 [▶]
        }
        "shippingType" => "Free"
        "shipToLocations" => RepeatableType {#1582 ▶}
        "expeditedShipping" => true
        "oneDayShippingAvailable" => true
        "handlingTime" => 0
      ]
      -attachment: array:2 [▶]
    }
    "sellingStatus" => SellingStatus {#1578 ▶}
    "listingInfo" => ListingInfo {#1583 ▶}
    "returnsAccepted" => true
    "condition" => Condition {#1588 ▶}
    "isMultiVariationListing" => false
    "topRatedListing" => false
  ]
  -attachment: array:2 [▶]
}

doesn't use default config

I would like to use this library for setting up notifications.
After I entered my api keys into the configuration.php I get this error:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Cannot read credentials from /.ebay_sdk/credentials' in C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php:132 Stack trace: #0 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php(83): DTS\eBaySDK\Credentials\CredentialsProvider::DTS\eBaySDK\Credentials{closure}() #1 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php(58): DTS\eBaySDK\Credentials\CredentialsProvider::DTS\eBaySDK\Credentials{closure}() #2 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\functions.php(61): DTS\eBaySDK\Credentials\CredentialsProvider::DTS\eBaySDK\Credentials{closure}() #3 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\ConfigurationResolver.php(55): DTS\eBaySDK\applyCredentials(Object(Closure), Array) #4 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Services\BaseService.php(53): DTS\eBaySDK\ConfigurationResolver->resolve(Array) #5 C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Shoppin in C:\xampp\htdocs\ebay\ebay-sdk-php\DTS\eBaySDK\Credentials\CredentialsProvider.php on line 132

my structure of folder:

  • index.php
  • ebay-sdk
  • configuration.php
  • all other sdk files

Config looks like: Screenshot

Error 500 with BulkDataExchangeService

Hi,

I have to send tracking informations to ebay and found your sdk-examples.

I tried to test your example <04-set-shipment-tracking-info> but always get this error:

Guzzle\Http\Exception\ServerErrorResponseException: Server error response
[status code] 500
[reason phrase] Internal Server Error
[url] https://webservices.sandbox.ebay.com/BulkDataExchangeService in C:\Roesgen\Projects\PHPStorm\ebay-sdk-examples-master\vendor\guzzle\guzzle\src\Guzzle\Http\Exception\BadResponseException.php on line 43

The configuration should be fine, because <03-simple-keywords-search> works.

Do you have any idea?

Thanks for any help.
Frank

trading api issue in german site id

Hi David,

We have tried with this ebay examples, it works in US SITEID, but not working in GERMANY ( DE ) SITE ID,
Please help us to resolve this issue..

Thanks in advance,

Help with ReviseInventoryStatusRequestType.

Hi.

I was trying to update the qty of the item that previusly listed using the example. But i'm managed some bad.

My code

$request = new Types\ReviseInventoryStatusRequestType();

$request->RequesterCredentials = new Types\CustomSecurityHeaderType();
$request->RequesterCredentials->eBayAuthToken = $this->config[$entorno]['userToken'];

$inventory = new Types\InventoryStatusType();

$inventory->ItemID = "281689406834";
$inventory->SKU = "MO-10240";
$inventory->Quantity = 100;
$inventory->StartPrice = new Types\AmountType(array('value' => (float)4.95));

$request->InventoryStatus = $inventory;

$response = $this->service->ReviseInventoryStatus($request);

The error I get from SDK is.

( ! ) Fatal error: Uncaught exception 'DTS\eBaySDK\Exceptions\InvalidPropertyTypeException' with message 'Invalid property type: DTS\eBaySDK\Trading\Types\ReviseInventoryStatusRequestType::InventoryStatus expected <DTS\eBaySDK\Types\UnboundType>, got <DTS\eBaySDK\Trading\Types\InventoryStatusType>' in /var/www/ebay-sdk-trading-master/ebay-sdk-examples-master/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/BaseType.php on line 334

( ! ) DTS\eBaySDK\Exceptions\InvalidPropertyTypeException: Invalid property type: DTS\eBaySDK\Trading\Types\ReviseInventoryStatusRequestType::InventoryStatus expected <DTS\eBaySDK\Types\UnboundType>, got <DTS\eBaySDK\Trading\Types\InventoryStatusType> in /var/www/ebay-sdk-trading-master/ebay-sdk-examples-master/vendor/dts/ebay-sdk/src/DTS/eBaySDK/Types/BaseType.php on line 334

Can you help me?. Thx.

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

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?

Exception: Call to undefined function DTS\eBaySDK\applyDebug()

An uncaught Exception was encountered
Type: Error
Message: Call to undefined function DTS\eBaySDK\applyDebug()
Filename: >C:\xampp\htdocs\test\application\third_party\ebaysdk\DTS\eBaySDK\ConfigurationResolver.php
Line Number: 59
Backtrace:
File: >C:\xampp\htdocs\test\application\third_party\ebaysdk\DTS\eBaySDK\Services\BaseRestService.php
Line: 53
Function: resolve

File: >C:\xampp\htdocs\test\application\third_party\ebaysdk\DTS\eBaySDK\Inventory\Services\InventoryBaseService.php
Line: 32
Function: __construct

File: >C:\xampp\htdocs\test\application\third_party\ebaysdk\DTS\eBaySDK\Inventory\Services\InventoryService.php
Line: 314
Function: __construct

File: C:\xampp\htdocs\test\application\models\EbayModel.php
Line: 680
Function: __construct

File: C:\xampp\htdocs\test\application\controllers\Ebay.php
Line: 32
Function: loadOnEbay

I have the error above.
This happens when it's called the code below, as explained in the Create or replace inventory item example

/** * Create the service object. */ $service = new DTS\eBaySDK\Inventory\Services\InventoryService([ 'authorization' => $ebayConfig['sandbox']['oauthUserToken'], 'requestLanguage' => 'en-US', 'responseLanguage' => 'en-US', 'sandbox' => true ]);

Could you help me?

Thanks in advance

Setting up Return Policy RestockingFeeValueOption & Standard Shipping - error value is not valid.

Hi David,
I am currently on process of adding shipping and return policy details, but when i try to post the item to ebay i got an error saying invalid value.

Here's the sample code.

            $item->PaymentMethods = array('VisaMC', 'PayPal');
            $item->PayPalEmailAddress = '[email protected]';
            $item->DispatchTimeMax = 3;

            $shippingDetails = new TTypes\ShippingDetailsType();
            $shippingDetails->ShippingType = 'Flat';

            $shippingService = new TTypes\ShippingServiceOptionsType();
            $shippingService->ShippingServicePriority = 1;
            $shippingService->ShippingService = 'Other' ;
            $shippingService->ShippingServiceCost = new TTypes\AmountType(array('value' => 0.00, 'currencyID' => 'USD'));
            $shippingService->ShippingServiceAdditionalCost= new TTypes\AmountType(array('value' => 0.00, 'currencyID' => 'USD'));
            $shippingService->FreeShipping = true;
            $shippingDetails->ShippingServiceOptions[] = $shippingService;

            $shippingService = new TTypes\ShippingServiceOptionsType();
            $shippingService->ShippingServicePriority = 2;
            $shippingService->ShippingService = 'USPSParcel';
            $shippingService->ShippingServiceCost = new TTypes\AmountType(array('value' => 2.00, 'currencyID' => 'USD'));
            $shippingDetails->ShippingServiceOptions[] = $shippingService;

            $shippingService = new TTypes\InternationalShippingServiceOptionsType();
            $shippingService->ShippingServicePriority = 1;
            $shippingService->ShippingService = 'USPSFirstClassMailInternational';
            $shippingService->ShippingServiceCost = new TTypes\AmountType(array('value' => 3.00, 'currencyID' => 'USD'));
            $shippingService->ShipToLocation[] = 'Worldwide';
            $shippingDetails->InternationalShippingServiceOption[] = $shippingService;

            $shippingService = new TTypes\InternationalShippingServiceOptionsType();
            $shippingService->ShippingServicePriority = 2;
            $shippingService->ShippingService = 'USPSPriorityMailInternational';
            $shippingService->ShippingServiceCost = new TTypes\AmountType(array('value' => 4.00, 'currencyID' => 'USD'));
            $shippingService->ShipToLocation = array(
              'Americas',
              'CA',
              'AU',
              'Europe',
              'JP'
            );
            $shippingDetails->InternationalShippingServiceOption[] = $shippingService;

            $item->ShippingDetails = $shippingDetails;
            /**
             * The return policy.
             * Returns are accepted.
             * A refund will be given as money back.
             * The buyer will have 14 days in which to contact the seller after receiving the item.
             * The buyer will pay the return shipping cost.
             */
            $item->ReturnPolicy = new TTypes\ReturnPolicyType();
            $item->ReturnPolicy->ReturnsAcceptedOption = 'ReturnsAccepted';
            $item->ReturnPolicy->RefundOption = 'MoneyBack';
            $item->ReturnPolicy->ReturnsWithinOption = 'Days_30';
            $item->ReturnPolicy->ShippingCostPaidByOption = 'Buyer';
            $item->ReturnPolicy->RestockingFeeValueOption = '15%';

            /**
             * Finish the request object.
             */
            $request->Item = $item;

Thanks in advance!
Jerome

How to set Global Shipping Program and some setting for additional information

I have tried to list item on UK eBay site by api
When I try to use Global shipping program, get error

gps

My code is following

$item->ShippingDetails = new Types\ShippingDetailsType();

$item->ShippingDetails->ShippingType = Enums\ShippingTypeCodeType::C_FLAT_DOMESTIC_CALCULATED_INTERNATIONAL;

//service setting for Royal Mail 1st Class & Free shipping

$shippingService = new Types\ShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 1;
$shippingService->ShippingService = "UK_RoyalMailFirstClassStandard";
$shippingService->FreeShipping = true;

$item->ShippingDetails->ShippingServiceOptions[] = $shippingService;

//international setting for Global Shipping Programme, but not sure

$shippingService = new Types\InternationalShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 2;
$shippingService->ShippingService = "InternationalPriorityShippingUK";

$item->ShippingDetails->InternationalShippingServiceOption[] = $shippingService;

when i use this code, I get error

Postage service is not available.Postage service International Priority Shipping(50300) is not available.Invalid Postage Type.Postage Type is not supported by this site.

What is solution to set Global Shipping Programe?

Also I need help for some setting by api

How to set addtional return policicy details?
How to set additional payment instructions?

Thanks

error 01-search-for-items.php on line 42

Hi i try to use that app and i have that problem:

Fatal error: Class 'DTS\eBaySDK\Browse\Services\BrowseService' not found in /var/www/html/ebay-sdk-examples/browse/01-search-for-items.php on line 42

Any idea what it could be?

thanks.

Code-Formating

Hi David,

do you have an code-style definition-file for phpstorm?

Shipping Discount

Hi, how can i activate the discount for combined payment?

zwischenablage01

the checkbox must be checked

addFixedPriceItem with Free shipping method listing on ebay store issue

Hi David,

Im having an issue regarding the addFixedPriceItem with free shipping method on setup. after i listed the product it shows this on my product listing

  • Shipping: Read item description or contact seller for details.
  • Delivery: Varies

But before when i listed a free shipping listings it all good.

here's my code
$shippingDetails = new TTypes\ShippingDetailsType();
$shippingDetails->ShippingType = 'Flat';
$shippingService = new TTypes\ShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 1;
$shippingService->ShippingService = 'ShippingMethodStandard' ;
$shippingService->ShippingServiceCost = new TTypes\AmountType(array('value' => 0.00, 'currencyID' => 'USD'));
$shippingService->ShippingServiceAdditionalCost= new TTypes\AmountType(array('value' => 0.00, 'currencyID' => 'USD'));
$shippingService->FreeShipping = true;
$shippingDetails->ShippingServiceOptions[] = $shippingService;

Please see attach file for reference
Correct listing
listings - before

Not Correct
listings - after

Thanks in advance,
Jerome

Invalid property type: DTS\eBaySDK\Trading\Types\StoreCustomCategoryArrayType::CustomCategory expected <DTS\eBaySDK\Types\UnboundType>, got <DTS\eBaySDK\Trading\Types\StoreCustomCategoryType>

now i'm trying to store custom category to ebay store and i got this error

my code is like this.

`$siteId = Constants\SiteIds::US;

$config = config('configuration');

$service = new Services\TradingService(array(
'apiVersion' => $config['tradingApiVersion'],
'sandbox' => true,
'siteId' => $siteId,
'devId' => $config['sandbox']['devId'],
'appId' => $config['sandbox']['appId'],
'certId' => $config['sandbox']['certId']
));

$requests = new Types\SetStoreCategoriesRequestType();

$requests->RequesterCredentials = new Types\CustomSecurityHeaderType();
$requests->RequesterCredentials->eBayAuthToken = $config['sandbox']['userToken'];

$requests->Action = 'add';
$requests->ItemDestinationCategoryID = intval(1);
$requests->DestinationParentCategoryID = intval(0);

$storeCustomCategoryType = new Types\StoreCustomCategoryType();
$storeCustomCategoryType->Name = 'first 1 category testing';
$storeCustomCategoryType->Order = intval(1);

$storeCustomCategory = new Types\StoreCustomCategoryArrayType();
$storeCustomCategory->CustomCategory = $storeCustomCategoryType;

$StoreCategories[] = $storeCustomCategory;

$requests->StoreCategories = $StoreCategories;`

i can't understand this error please reply me with solution.

how to add scheduled time in additem Trading API.

Hello,

First of all thanks for great help on ebay API. But I am not able to find the way to add scheduled time. So can you please let me know the way to do so.

I try $item->ScheduleTime=gmdate('Y-m-d\TH:i:s\Z'); But got error. Please let me know step for this. Thanks.

Thanks
Tarun

proposition about add items

Hello, seriously I like your sdk and it's helpful, and it's so easy to use it
but i have some questions
first : why don't use add items instead of add item ?
In the eBay documentation
“ AddItems
Use this call to define one to five items and list them on the specified eBay site.”
that will be good.
And how to add item with non-specifing category or just let “ SugesstedCategorie “ try to catch it,.
In my project, I used to create a page when I select mufti items without categories.And add them to ebay..

Thanks :)

Odd eBay Behavior

I am sorry for posting this here, because I assume its not this git project, but I am looking for some ideas.

I built a simple product with your API. My Customer uploads a csv, then I give a publish button where they update what they want, then post. I am using: addFixedPriceItem.

They all get imported into eBay perfectly. It looks great. Then, within 24 hours, ebay updates a handful of them, and changes 2 values:
Sale Start
Buy It Now Price

They tell me my API call did it... but it happened while no one was online... and it happens alot.

Customer does edit description and "markdowns" inside ebay itself. But, not at those times... those changes are still hours after any of us touch it. And, again, they claim its from our API calls.

add abortJob example in large merchant - code given

<?php
/**
 * Copyright 2016 David T. Sadler
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Include the SDK by using the autoloader from Composer.
 */
require __DIR__.'/../vendor/autoload.php';

/**
 * Include the configuration values.
 *
 * Ensure that you have edited the configuration.php file
 * to include your application keys.
 */
$config = require __DIR__.'/../configuration.php';
$config['production']['authToken'] = '<AUTH TOKEN>';

/**
 * The namespaces provided by the SDK.
 */
use \DTS\eBaySDK\Constants;
use \DTS\eBaySDK\BulkDataExchange\Services;
use \DTS\eBaySDK\BulkDataExchange\Types;

/**
 * Create the service object.
 */
$service = new Services\BulkDataExchangeService([
    'credentials' => $config['production']['credentials'],
    'authToken'   => $config['production']['authToken'],
    'sandbox'     => false
]);


/**
 * Create the request object.
 */
$request = new Types\AbortJobRequest();
$request->jobId ='6005936797';

/**
 * Send the request.
 */
$response = $service->abortJob($request);

/**
 * Output the result of calling the service operation.
 */
if (isset($response->errorMessage)) {
    print_r($response->errorMessage->error);
}


if ($response->ack !== 'Failure') {
    /**
     * Just display the first 5 jobs from the response.
     */

    print_r($response);
}

SoldList example

Hallo,

firstly i would like to say thanks for the great work you did. I've got a small ebay shop and successfully managed to get your example.php "11-get-my-ebay-selling.php" working..

I'm relatively new to this. Can you give an example how i can get the SoldItems-List instead of the ActiveList as a result?

All i get is a empty result. Maybe it's the way i handle the response? Is it an array?

After all i think something wrong here:

if ($response->Ack !== 'Failure' && isset($response->SoldList)) {
    foreach ($response->SoldList->ItemArray->Item as $item) {
        echo "(" . $item->ItemID . ") " . $item->Title . " " . $item->SellingStatus->CurrentPrice->currencyID . " " . $item->SellingStatus->CurrentPrice->value . "<br />\n";
    }
}

Thanks a lot,

Gamesbyer

Finding API examples crash

Hello!

I've tried some examples from Finding API and they all crash with following error:

PHP Fatal error:  Uncaught exception 'Guzzle\Http\Exception\ServerErrorResponseException' with message 'Server error response
[status code] 500
[reason phrase] Internal Server Error
[url] http://svcs.ebay.com/services/search/FindingService/v1' in /Users/dev/ebay/test3/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php:43
Stack trace:
#0 /Users/dev/ebay/test3/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response))
#1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 /Users/dev/ebay/test3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatche in /Users/dev/ebay/test3/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php on line 43

any idea what could be wrong?

getOrders

Hello everyone,

I was trying to get all my purchases I did since this week on my sandbox ebay with the function getOrders but when I put

       $request->NumberOfDays = 30;

I have no results and when I add the filter

        $request->OrderStatus = OrderStatusCodeType::C_ALL;

to be sure I take them all and still nothing .. but on my sbx ebay account I do have one purchase that I bought yesterday

Has anyone had the same problem ?

Thanks in advance,

Fabricio

add one item to ebay

Hi,

I'm openning this in order to have an example to create a product on ebay via your API.

I saw your example there : https://github.com/davidtsadler/ebay-sdk-trading/issues/1#issuecomment-35777796

I updated your code to the current API (refactoring names only)

I don't know why I got this error because even though I injected the token like you shows us on the tutorial :/

L'en-tête "X-EBAY-API-APP-NAME" n'existe pas.
L'en-tête "X-EBAY-API-DEV-NAME" n'existe pas.
L'en-tête "X-EBAY-API-CERT-NAME" n'existe pas.

It says that headers "X-EBAY-API-HERP-NAME" doesn't exist.

Here is the code I use

require '/vendor/autoload.php';

use \DTS\eBaySDK\Trading\Services\TradingService;
use \DTS\eBaySDK\Trading\Types as Types;
use \DTS\eBaySDK\Trading\Enums as Enums;
use \DTS\eBaySDK\Constants\SiteIds;
use \DTS\eBaySDK\HttpClient\HttpClient;

// Instantiate a service.
$service = new TradingService(array(
      'apiVersion' => 873,
      'siteId' => SiteIds::FR
  ));


$requesterCredentials = new Types\CustomSecurityHeaderType();
$requesterCredentials->eBayAuthToken = $config['production']['userToken'];

$item = new Types\ItemType();

$item->Site = 'FR';

$item->ListingType = 'Chinese';
$item->ListingDuration = 'Days_10';
$item->Quantity = 1;
$item->StartPrice = new Types\AmountType(array('value' => 100.99, 'currencyID' => 'EUR'));
$item->ReservePrice = new Types\AmountType(array('value' => 100.99, 'currencyID' => 'EUR'));
$item->BuyItNowPrice = new Types\AmountType(array('value' => 100.99, 'currencyID' => 'EUR'));

$item->Title = 'Example 4';
$item->Description = 'Example 4';
$item->SKU = 'L1';
$item->Currency = 'EUR';
$item->Country ='FR';
$item->Location = 'Rhone';
$item->PostalCode = '69000';

$picture = new Types\PictureDetailsType();
$picture->GalleryType = Enums\GalleryTypeCodeType::C_GALLERY;
$picture->ExternalPictureURL[] = 'http://dl.dropbox.com/u/25261546/t%20shirts/white.jpg';
$item->PictureDetails = $picture;

$primaryCategory = new Types\CategoryType();
$primaryCategory->CategoryID = '29792';
$item->PrimaryCategory = $primaryCategory;

$item->ConditionID = 1000;

$itemSpecifics = new Types\NameValueListArrayType();

$specific = new Types\NameValueListType();
$specific->Name = 'Subject';
$specific->Value[] = 'Fiction &amp; Literature';
$itemSpecifics->NameValueList[] = $specific;

$specific = new Types\NameValueListType();
$specific->Name = 'Topic';
$specific->Value[] = 'Fantasy';
$itemSpecifics->NameValueList[] = $specific;

$specific = new Types\NameValueListType();
$specific->Name = 'Format';
$specific->Value[] = 'MP3 CD';
$itemSpecifics->NameValueList[] = $specific;

$specific = new Types\NameValueListType();
$specific->Name = 'Length';
$specific->Value[] = 'Unabridged';
$itemSpecifics->NameValueList[] = $specific;

$specific = new Types\NameValueListType();
$specific->Name = 'Language';
$specific->Value[] = 'English';
$itemSpecifics->NameValueList[] = $specific;

$specific = new Types\NameValueListType();
$specific->Name = 'Country of Manufacture';
$specific->Value[] = 'United States';
$itemSpecifics->NameValueList[] = $specific;

$item->ItemSpecifics = $itemSpecifics;

$item->PaymentMethods = array('VisaMC', 'PayPal');
$item->PayPalEmailAddress = '[email protected]';
$item->DispatchTimeMax = 3;

$shippingDetails = new Types\ShippingDetailsType();
$shippingDetails->ShippingType = 'Flat';
$shippingDetails->PaymentInstructions = 'Praesent sagittis ornare.';

$shippingService = new Types\ShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 1;
$shippingService->ShippingService = 'Other' ;
$shippingService->ShippingServiceCost = new Types\AmountType(array('value' => 0.00, 'currencyID' => 'EUR'));
$shippingService->ShippingServiceAdditionalCost= new Types\AmountType(array('value' => 0.00, 'currencyID' => 'EUR'));
$shippingService->FreeShipping = true;
$shippingDetails->ShippingServiceOptions[] = $shippingService;

$shippingService = new Types\ShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 2;
$shippingService->ShippingService = 'USPSParcel';
$shippingService->ShippingServiceCost = new Types\AmountType(array('value' => 2.00, 'currencyID' => 'EUR'));
$shippingDetails->ShippingServiceOptions[] = $shippingService;

$shippingService = new Types\InternationalShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 1;
$shippingService->ShippingService = 'USPSFirstClassMailInternational';
$shippingService->ShippingServiceCost = new Types\AmountType(array('value' => 3.00, 'currencyID' => 'EUR'));
$shippingService->ShipToLocation[] = 'Worldwide';
$shippingDetails->InternationalShippingServiceOption[] = $shippingService;

$shippingService = new Types\InternationalShippingServiceOptionsType();
$shippingService->ShippingServicePriority = 2;
$shippingService->ShippingService = 'USPSPriorityMailInternational';
$shippingService->ShippingServiceCost = new Types\AmountType(array('value' => 4.00, 'currencyID' => 'EUR'));
$shippingService->ShipToLocation = array(
  'Americas',
  'CA',
  'AU',
  'Europe',
  'JP'
);
$shippingDetails->InternationalShippingServiceOption[] = $shippingService;

$shippingDetails->ExcludeShipToLocation = array(
  'Alaska/Hawaii',
  'US Protectorates',
  'APO/FPO',
  'DZ',
  'AZ'
);

$salesTax = new Types\SalesTaxType();
$salesTax->SalesTaxState = 'AL';
$salesTax->SalesTaxPercent = 19.600;
$salesTax->ShippingIncludedInTax = true;
$shippingDetails->SalesTax = $salesTax;

$item->ShippingDetails = $shippingDetails;

$buyerRequirements = new Types\BuyerRequirementDetailsType();
$buyerRequirements->ShipToRegistrationCountry = true;
$item->BuyerRequirementDetails = $buyerRequirements;

$item->SellerProfiles = new Types\SellerProfilesType();
$item->SellerProfiles->SellerReturnProfile = new Types\SellerReturnProfileType();
$item->SellerProfiles->SellerReturnProfile->ReturnProfileID = 5000897000;

$request = new Types\AddItemRequestType();
$request->RequesterCredentials = $requesterCredentials;
$request->Item = $item;

$response = $service->addItem($request);

if ($response->Ack === 'Failure') {
  foreach ($response->Errors as $error) {
      echo $error->ShortMessage."\n";
  }
}
else {
    $itemId = $response->ItemId;

    echo $itemId."\n";

    $request = new Types\GetItemRequestType();
    $request->RequesterCredentials = $requesterCredentials;
    $request->ItemId = $itemId;
    $response = $service->getItem($request);

}

Some help would be nice even though I feel stupid because it's an authentification problem.

Cannot read credentials

An uncaught Exception was encountered
Type: InvalidArgumentException
Message: Cannot read credentials from C:\Users\Cesare/.ebay_sdk/credentials

Filename: >C:\xampp\htdocs\test\application\third_party\ebaysdk\DTS\eBaySDK\Credentials\CredentialsProvider.php
Line Number: 132

Backtrace:

Hi,
I have the error above when I try to use the code in 03-refresh-user-token.php

Could you help me?

Thank you in advance

500 Internal Server Error issue

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?

GetSuggestedCategories

This is not a bug, but for some reason I am having a lot of trouble figuring out:
GetSuggestedCategoriesRequestType

Here is what I have tried:
`$catreq = new Types\GetSuggestedCategoriesRequestType(['Query'=>['electronics']]);
//$catreq->Query=['electronics'];

$catreq->RequesterCredentials = new Types\CustomSecurityHeaderType();
$catreq->RequesterCredentials->eBayAuthToken = $config['sandbox']['userToken'];

$cat= $service->getSuggestedCategories($catreq);
`

It seems query is passed in constructor of the Type... and I tried many formats for it. In the above format no matter what I write it always returns 0 categories, but no error.

how to revise item

i want to update stock and price to fixed price item , so how i do this?
plz it is urgent , i use your code to list item , but my requirement is to update stock and price .
mail id is : [email protected]

request for trading update item example

Thanks so much for this SDK and all the documentation around it!

Just wondering if you could provide an example of updating an item via the trading api.

I would like to be able to:

  • update title/description
  • increase quantity

Ebay Category Issue

Hi, I have question regarding the ebay categories. can i get a specific categories from ebay by using products categories came from amazon and attach to add item function in ebay?

I just want to post products to ebay using the products from amazon and my issue is i cant get specific categories by using the product categories from amazon.

Thanks & Regards.
JeromeD

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.