sapientpro/ebay-traditional-sdk

Ebay Traditional API SDK for PHP

v1.0.0 2023-05-03 11:46 UTC

This package is not auto-updated.

Last update: 2024-04-26 14:30:28 UTC


README

This is a fork of the original dts/ebay-sdk-php by @davidtsadler, with support for PHP 8 and compatibility with Guzzle 7.

The original project has been officially abandoned in February 2020.

This project enables PHP developers to use the Traditional eBay APIs in their PHP code, and build software using services such as Finding, Trading, Shopping, etc.

Features

Prerequisites

  • PHP 8 or higher 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 sapientpro/ebay-traditional-sdk

Example usage

Here is the example usage of the package. Visit wiki for more detailed documentation and examples.

Get the official eBay time

<?php
use EBay\SDK\Shopping\Services\ShoppingService;
use EBay\SDK\Shopping\Types\GetEbayTimeRequestType;

// 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'));