PHP code example of bramatom / selling-partner-amazon

1. Go to this page and download the library: Download bramatom/selling-partner-amazon 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/ */

    

bramatom / selling-partner-amazon example snippets


$marketplace = new AmazonMarketPlace(AmazonMarketplaceId::NORTH_AMERICA);

if ($marketplace->error) {
    // handle error
} else {
    echo 'ID: ' . $marketplace->getId() . "\n";
    echo 'Name: ' . $marketplace->getName() . "\n";
    echo 'Zone: ' . $marketplace->getZone() . "\n";
    echo 'Endpoint: ' . $marketplace->getEndpoint() . "\n";
}