I was trying to get the information regarding the Product catalog via _GET_WEBSTORE_PRODUCT_CATALOG_ ReportType. I was succesfull in submitting the report request and even it was processed and even the processing status was DONE and generated id was also collected. But when I try to get the report via the Action: GetReport it gives an Market place is not sent, even though the market place was mentioned. Below is the sample of codes and I m not using any of the PHP client library....
Code Sample
<?php
require 'config.php';
$param = array(
'AWSAccessKeyId'=> AWS_KEY,
'Action'=>'GetReport',
'ReportId'=>'513798174016724',
'Merchant'=> MERCHANT_ID,
'SignatureMethod' => "HmacSHA256",
'SignatureVersion'=> "2",
'Timestamp'=> gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time()),
'Version' => "2009-01-01",
'Marketplace'=>MARKETPLACE
);
$secret = AWS_SECRET_ACCESS_KEY;
$url = array();
foreach ($param as $key => $val) {
$key = str_replace("%7E", "~", rawurlencode($key));
$val = str_replace("%7E", "~", rawurlencode($val));
$url[] = "{$key}={$val}";
}
sort($url);
$arr = implode('&', $url);
$sign = 'POST' . "
";
$sign .= 'mws.amazonservices.com' . "
";
$sign .= '/' . "
";
$sign .= $arr;
$signature = hash_hmac("sha256", $sign, $secret, true);
$signature = urlencode(base64_encode($signature));
$link = "https://mws.amazonservices.com/?";
$link .= $arr . "&Signature=" . $signature;
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $link,
CURLOPT_POST => 1,
)
);
$resp1 = curl_exec($curl);
curl_close($curl);
print_r($resp1);
And error Sample Please indicate a marketplace for which the report is required. Is there anything I am missing... or where I have mistyped something ... Thanks for the solution in advance..