Exeu/Amazon-ECS-PHP-Library — Issue #33: Missing Required Parameter Error
Author: KayBeSee
Created: 2012-02-24 03:24:24+00:00
State: open

Hey Jan --

I am just experimenting with this code to build a web application for my site. I am not the most experienced coder, but have done some work with Wordpress and PHP in the past. I have edited the "sampleSettings.php" and placed it in the same directory as the file I am working on and also have "lib/AmazonECS.class.php" linked correctly with all the correct IDs, Tags, etc inputted.

When I use the following source code:

returnType(AmazonECS::RETURN_TYPE_ARRAY);

// changing the category to DVD and the response to only images and looking for some matrix stuff.
$response = $amazonEcs->category('DVD')->responseGroup('Images')->country('us')->search("Matrix Revolutions");
var_dump($response);

catch(Exception $e)
{
echo $e->getMessage();
}

I get this result printed:

array(2) {
["OperationRequest"]=>
array(4) {
["HTTPHeaders"]=>
array(1) {
["Header"]=>
array(2) {
["Name"]=>
string(9) "UserAgent"
["Value"]=>
string(14) "PHP-SOAP/5.3.1"
}
}
["RequestId"]=>
string(36) "3cf95c06-31e7-432f-9bf5-2626e1c212c3"
["Arguments"]=>
array(1) {
["Argument"]=>
array(2) {
["Name"]=>
string(7) "Service"
["Value"]=>
string(19) "AWSECommerceService"
}
}
["RequestProcessingTime"]=>
float(0.002351)
}
["Items"]=>
array(1) {
["Request"]=>
array(3) {
["IsValid"]=>
string(5) "False"
["ItemSearchRequest"]=>
array(3) {
["Keywords"]=>
string(18) "Matrix Revolutions"
["ResponseGroup"]=>
string(6) "Images"
["SearchIndex"]=>
string(3) "DVD"
}
["Errors"]=>
array(1) {
["Error"]=>
array(2) {
["Code"]=>
string(21) "AWS.MissingParameters"
["Message"]=>
string(86) "Your request is missing required parameters. Required parameters include AssociateTag."
}
}
}
}
}

It saids I am missing the required parameter "AssociateTag" but that setting is inputted in the settings file twice (Associate_Tag & Another_Associate_Tag). Can you help me out and maybe explain what I am doing wrong? I would really appreciate it.

Also, I apologize for the wall of code.