* Time: 12:27 PM */ //require 'vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php'; $config = (require __DIR__ . '/configuration.php'); use DTS\eBaySDK\Constants; use DTS\eBaySDK\Finding\Services; use DTS\eBaySDK\Finding\Types; /* use \DTS\eBaySDK\Shopping\Services;*/ use DTS\eBaySDK\Shopping\Services as ShServices; use DTS\eBaySDK\Shopping\Types as ShTypes; //echo "<h1>الله اكبر</h1>"; $ShService = new ShServices\ShoppingService(array('apiVersion' => $config['shoppingApiVersion'], 'appId' => $config['production']['appId'])); $ShRequest = new ShTypes\GeteBayTimeRequestType(); $ShRequest = $ShService->geteBayTime($ShRequest); if ($ShRequest->Ack !== 'Success') { if (isset($ShRequest->Errors)) { foreach ($ShRequest->Errors as $error) { printf("Error: %s\n", $error->ShortMessage); } } } else { printf("The official eBay time is: %s\n", $ShRequest->Timestamp->format('H:i (\\G\\M\\T) \\o\\n l jS F Y')); } echo "</br>"; echo "--------------------------------------------------------------------------------"; // Create the service object. $service = new Services\FindingService(['appId' => 'KKK6bb807-2fab-408e-aea4-9b2a2a89b87', 'globalId' => Constants\GlobalIds::US]); // Create the request object. //$request = new Types\FindItemsAdvancedRequest();
*/ $service = new Services\ShoppingService(array('apiVersion' => $config['shoppingApiVersion'], 'appId' => $config['production']['appId'])); /** * Create the request object. * * For more information about creating a request object, see: * http://devbay.net/sdk/guides/getting-started/#request-object */ $request = new Types\GeteBayTimeRequestType(); /** * Send the request to the GeteBayTime service operation. * * For more information about calling a service operation, see: * http://devbay.net/sdk/guides/getting-started/#service-operation */ $response = $service->geteBayTime($request); /** * Output the result of calling the service operation. * * For more information about working with the service response object, see: * http://devbay.net/sdk/guides/getting-started/#response-object */ if ($response->Ack !== 'Success') { if (isset($response->Errors)) { foreach ($response->Errors as $error) { printf("Error: %s\n", $error->ShortMessage); } } } else { printf("The official eBay time is: %s\n", $response->Timestamp->format('H:i (\\G\\M\\T) \\o\\n l jS F Y')); }