PHP code example of enbit / amazon-mws-laravel

1. Go to this page and download the library: Download enbit/amazon-mws-laravel 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/ */

    

enbit / amazon-mws-laravel example snippets




return [
    'Access_Key_ID' => env('MWS_ACCESS_KEY_ID'),
    'Secret_Access_Key' => env('MWS_SECRET_KEY'),
    'Seller_Id' => env('MWS_SELLER_ID'),
    'Marketplace_Id' => env('Marketplace_Id', 'DE'),
];

$config = [
              'Access_Key_ID' => 'MWS_ACCESS_KEY_ID',
              'Secret_Access_Key' => 'MWS_SECRET_KEY',
              'Seller_Id' => 'MWS_SELLER_ID',
              'Marketplace_Id' => 'Marketplace_Id',
          ];
$amazonMWS = app()->makeWith('enbit-amazon-mws', $config);

$fromDate = new DateTime('2016-01-01');
$orders = AmazonMWS::ListOrders($fromDate);
foreach ($orders as $order) {
    $items = AmazonMWS::ListOrderItems($order['AmazonOrderId']);
    print_r($order);
    print_r($items);
}