PHP code example of mattybaer / ebay-sdk-php
1. Go to this page and download the library: Download mattybaer/ebay-sdk-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mattybaer / ebay-sdk-php example snippets
DTS\eBaySDK\Notifcation\Services;
use \DTS\eBaySDK\Notifcation\Types;
// Fetch request headers from eBay
$headers = getallheaders();
$key = base64_decode($headers['x-ebay-signature']);
// Create the service object.
$service = new Services\NotificationService([
'authorization' => <AUTHORIZATION_HERE>
]);
// Create the request object.
$request = new Types\GetPublicKeyRestRequest();
$request->public_key_id = $key;
// Send the request to the service operation.
$response = $service->getPublicKey($request);
// Output the result of calling the service operation.
printf("Your official eBay public key is: %s\n", print_r($response, true));
curl -sS https://getcomposer.org/installer | php
php composer.phar