1. Go to this page and download the library: Download shoper/sdk 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/ */
shoper / sdk example snippets
use Shoper\Sdk\ShoperClient;
$client = new ShoperClient('https://yourshop.shoparena.pl');
$client->authenticate('admin-user', 'admin-pass'); // fetches and stores the token
use Shoper\Sdk\Paginator;
use Shoper\Sdk\Rest\Products\Requests\ListProductsRequest;
$fetch = fn (array $params) => (array) $client->products()->listProducts(new ListProductsRequest($params));
foreach (new Paginator($fetch, limit: 50) as $product) {
// streams across all pages, transparent
}
use Shoper\Sdk\WebhookVerifier;
$verifier = new WebhookVerifier($appstoreSecret, $webhookSecret);
if (!$verifier->verifyFromGlobals(file_get_contents('php://input'))) {
http_response_code(401);
exit;
}
$client->products(); // \Shoper\Sdk\Rest\Products\ProductsClient
$client->orders(); // \Shoper\Sdk\Rest\Orders\OrdersClient
$client->categories();
// ... 71 more — see scripts/sub-clients.expected.php for the canonical list
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.