John
John

Reputation: 1

amazon marketplace web service (amazon mws) using PHP

I'm working on a scrirpt made available from MWS to this address

mws-amazon-marketplace-web-service-api.html

I installed it on my server, I configured the file src/MWSProductsPHPClientLibrary/src/MarketplaceWebServiceProducts/Samples/.config.inc.php

putting all the necessary data

if I try to run the file src/MWSProductsPHPClientLibrary/src/MarketplaceWebServiceProducts/Samples/ListMatchingProductsSample.php

I get a critical error like this

Caught Exception: Required parameter MarketplaceId not found Response Status Code: 400 
Error Code: MissingParameter 
Error Type: Sender 
Request ID: c5e060de-df51-4887-a240-087f2853c7b7 
XML: SenderMissingParameterRequired parameter 
MarketplaceId not foundc5e060de-df51-4887-a240-087f2853c7b7 
ResponseHeaderMetadata: 
    RequestId: c5e060de-df51-4887-a240-087f2853c7b7, 
    ResponseContext: YjcUwwOt6qFzvvkv1HP3WesimE9SujozkeJ4oOS30C+9psFOd1bzyMj53SkgRjYTB2xhbkn8M15n Cus21PhmzarCt9135WwI,Jf31iVOVq4S+8cTeowFbPU318rM7oIURQW3eTIFmAyJBuNUCwg6wgUJMMgtlbd5nqAJQaf3IjGg=, 
    Timestamp: 2015-04-28T22:26:39.977Z, 
    Quota Max: 711.0, 
    Quota Remaining: 711.0, 
    Quota Resets At: 2015-04-28T22:30:00.000Z

I'm losing sleep to figure out what is wrong and what is missing, the assistance amazon is not the most brilliant and also on the web is not found anything specific to my case.

Would welcome the response of someone who has had the same problem and my solution which has found to be able to use the packages that MWS provides for scripting and query the webservice amazoini by bees.

Thanks

Upvotes: 0

Views: 1273

Answers (1)

Keyur Padalia
Keyur Padalia

Reputation: 2097

Basically You need to do these in your method or function where you create object for "ListMatchingProductsRequest". for UK marketplace_id is "A1F83G8C2ARO7P" for Germany it's "A1PA6795UKMFR9" and for France it's "A13V1IB3VIYZZH."

$request = new MarketplaceWebServiceProducts_Model_ListMatchingProductsRequest();
$request->setSellerId($seller_id);
$request->setMarketplaceId($marketplace_id);

Upvotes: 1

Related Questions