I am trying to add cart functions to the AmazonECS class available at https://github.com/Exeu/Amazon-ECS-PHP-Library
The main class of that project is https://github.com/Exeu/Amazon-ECS-PHP-Library/blob/master/lib/AmazonECS.class.php
It currently supports ItemLookup and ItemSearch but it does not have CartCreate, CartClear, CartAdd, CartGet, CartModify.
Amazon's documentation about these API calls can be found on this page http://docs.aws.amazon.com/AWSECommerceService/2011-08-01/DG/CartCreate.html
Here's one of the things I have tried which hasn't worked.
/**
* execute CartCreate request
*
* @param string $asin, $associateTag
*
* @return array|object return type depends on setting
*
* @see returnType()
*/
public function cartCreate($asin, $associateTag)
{
$params = $this->buildRequestParams('CartCreate', array(
array('Item.1.ASIN' => $asin, 'Item.1.Quantity' => 1),
'AssociateTag' => $associateTag,
));
return $this->returnData($this->performSoapRequest("CartCreate", $params));
}
Does anyone know what I'm doing wrong? The error message I get back from that call is
string(79) "Your request is missing required parameters. Required parameters include Items."