An eBay SDK for PHP. Use the eBay Trading API in your PHP projects.
This project enables PHP developers to use the eBay API in their PHP code, and build software using the Trading service. You can get started by installing the SDK via Composer and by following the Getting Started Guide.
- Compatible with PHP 5.3.9 or greater.
- Easy to install with Composer.
- Compliant with PSR-0, PSR-1 and PSR-2.
- User Guides - Getting started guide and in-depth information.
- SDK Versions - A complete list of each SDK, and the API version they support.
- Sample Project - Provides several examples of using the SDK.
- Google Group - Join for support with the SDK.
- @devbaydotnet - Follow on Twitter for announcements of releases, important changes and so on.
- PHP 5.3.3 or greater with the following extensions:
- 64 bit version of PHP recommended as there are some issues when using the SDK with 32 bit.
- SSL enabled on the cURL extension so that https requests can be made.
curl -sS https://getcomposer.org/installer | php
Install the SDK.
php composer.phar require dts/ebay-sdk-trading
Require Composer's autoloader by adding the following line to your code.
<?php require 'vendor/autoload.php'; use \DTS\eBaySDK\Constants; use \DTS\eBaySDK\Trading\Services; use \DTS\eBaySDK\Trading\Types; // Create the service object. $service = new Services\TradingService(array( 'apiVersion' => '863', 'siteId' => Constants\SiteIds::US )); // Create the request object. $request = new Types\GeteBayOfficialTimeRequestType(); $request->RequesterCredentials = new Types\CustomSecurityHeaderType(); $request->RequesterCredentials->eBayAuthToken = 'YOUR_PRODUCTION_USER_TOKEN_APPLICATION_KEY'; // Send the request to the service operation. $response = $service->geteBayOfficialTime($request); // Output the result of calling the service operation. printf("The official eBay time is: %s\n", $response->Timestamp->format('H:i (\G\M\T) \o\n l jS Y'));
This is a personal project that has been developed by me, David T. Sadler. I decided to create this project to make up for the lack of an official SDK for PHP. It is in no way endorsed, sponsored or maintained by eBay.
As this is a brand new project you should expect frequent releases until it reaches the stable
1.0.0 target. I will endeavour to keep changes to a minimum between each release and any changes will be documented.
Licensed under the Apache Public License 2.0.
Copyright 2014 David T. Sadler