brainstormdevel / ebay-sdk-php
An eBay SDK for PHP. Fork of dts/ebay-sdk-php with support for PHP 8.
Requires
- php-64bit: ^7.1 || ^8.0
- ext-curl: *
- ext-libxml: *
- guzzlehttp/guzzle: ^6.0 || ^7.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.5 || ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-10-17 20:37:07 UTC
README
This is a fork of the original dts/ebay-sdk-php by @davidtsadler, with support for PHP 7.3, PHP 7.4 and PHP 8, and compatibility with Guzzle 7.
The original project has been officially abandoned in February 2020.
I'm planning to maintain this fork in the short term. The aim is not to keep it up to date with the latest eBay API versions, but to provide a solution for a smooth upgrade of existing apps to PHP 8. New users should seek a better SDK for PHP.
This project enables PHP developers to use the eBay API in their PHP code, and build software using services such as Finding, Trading, Shopping, etc. You can get started by installing the SDK via Composer and by following the Basic Usage Guide.
This is a personal project that was originally developed by David T. Sadler, who 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.
Features
- Compatible with PHP 7.4 or PHP 8.
- Easy to install with Composer.
- Compliant with PSR-1, PSR-2 and PSR-4.
Resources
- User Guides - Getting started guide and in-depth information.
- Examples - Several examples of using the SDK.
Requirements
- PHP 7.4 or PHP 8 with the following extensions:
- curl
- libxml
- 64 bit version 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.
Installation
The SDK can be installed with Composer:
composer require benmorel/ebay-sdk-php
Example
Get the official eBay time
<?php require 'vendor/autoload.php'; use DTS\eBaySDK\Shopping\Services; use DTS\eBaySDK\Shopping\Types; // Create the service object. $service = new Services\ShoppingService(); // Create the request object. $request = new Types\GeteBayTimeRequestType(); // Send the request to the service operation. $response = $service->geteBayTime($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'));
Project Goals
- Be well maintained.
- Be well documented.
- Be well tested.
- Be well supported with working examples.
License
Licensed under the Apache Public License 2.0.
Copyright 2016 David T. Sadler.