1. Go to this page and download the library: Download dilneiss/shopee-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/ */
$parameters = (new \Shopee\Nodes\Item\Parameters\GetItemDetail())
->setItemId(1978);
$response = $client->item->getItemDetail($parameters);
/**
* Push Mechanism (WebHook)
*
* @see https://open.shopee.com/documents?module=63&type=2&id=55
*/
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Shopee\SignatureGenerator;
use Shopee\SignatureValidator;
use Slim\Factory\AppFactory;
Validator->isValid($request)) {
error_log('Invalid authorization signature');
return $response;
}
// TODO here to handle your business logic
// HTTP response must with status code 2xx and empty body
return $response;
});
$app->run();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.