PHP code example of pankrok / shoper-appstore-bundle

1. Go to this page and download the library: Download pankrok/shoper-appstore-bundle 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/ */

    

pankrok / shoper-appstore-bundle example snippets


use PanKrok\ShoperAppstoreBundle\Exception\ShoperApiException;

try {
    $data = $api->product->get()->getBodyArray();
} catch (ShoperApiException $e) {
    // $e->getShoperError()            → 'invalid_token'
    // $e->getShoperErrorDescription() → 'Token has expired'
    // $e->getStatusCode()             → 401
    throw $e;
}
bash
php bin/console make:migration
php bin/console doctrine:migrations:migrate
bash
php bin/console shoper:token:refresh