npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

amazon-mws-products

v2011.10.1

Published

Enter your credentials ----------------------

Downloads

8

Readme

amazon-mws-products

Enter your credentials

  1. Open /Samples/.config.inc.php

  2. Edit the following lines replacing the <> values with your credentials

    define('AWS_ACCESS_KEY_ID', '<Your Access Key ID>');
    define('AWS_SECRET_ACCESS_KEY', '<Your Secret Key>');
    
    define('APPLICATION_NAME', '<Your Application Name>');
    define('APPLICATION_VERSION', '<Your Application Version or Build Number>');
    
    define('MERCHANT_ID', '<Your Merchant Id>'); // If you are making calls on another seller's behalf, put their merchantID here.
    define('MARKETPLACE_ID', '<Your Marketplace Id>');

Edit the samples

In the /Samples folder you will find files that correspond to a particular Amazon Marketplace Web Service (Amazon MWS) operation. These files serve as examples to illustrate the code required to make the call for that particular operation. We will be using the SubmitFeed operation from the Feeds API section as an example.

  1. Open /Samples/SubmitFeedSample.php

  2. Uncomment the appropriate $serviceURL for the marketplace that you want to sell in. Example:

    $serviceUrl = "https://mws.amazonservices.com";
  3. Populate the $feed variable with the feed contents. Examples:

    // From a string
    $feed = "Feed content";
    
    // From a file
    $feed = file_get_contents("feed.txt");
  4. Uncomment $marketplaceIdArray and fill the array with the MarketplaceId values that you want to submit the feed to.

  5. Uncomment one of the two Amazon MWS request building methods between lines 126 - 170.

  6. Uncomment the following lines:

    invokeSubmitFeed($service, $request);
    
    @fclose($feedHandle);
  7. Start your server and navigate to the script's address to run it.

FAQ

Why does cURL return Error Response Status Code: 0?

If you receive the error Error Response Status Code: 0 from cURL when attempting to send a request to Amazon MWS using cURL, find and set CURLOPT_SSL_VERIFYPEER to false.

Why is FeedSubmissionResult being cut off?

This occurs when the server response is saved to memory. To avoid this, save the response to a file.

$responseFile = fopen("response.xml", "w");
fwrite($responseFile, $dom->saveXML());
fclose($responseFile);

What is in the /Mock folder?

The mock folder contains canned responses that simulate an Amazon MWS response. Mock responses are useful for testing without actually sending a request to Amazon MWS.