I can confirm that the data used by the Amazon MWS API curl upload (in client.php) is correct, as I can also manually upload this test file (copystream.txt) via seller central without errors. Stream_copy_to_stream($streamHandle, $copystream) $copystream = fopen('/copystream.txt', 'w') If I write the feed data to a seperate file, or take a copy of the stream and write that to a test file e.g. The feed submits without errors, but I always get an incorrect template type error from Amazon when I check the submission status. $_result=$this->invokeSubmitFeed($service, $request) $request = new \MarketplaceWebService_Model_SubmitFeedRequest($parameters) 'ContentMd5' => base64_encode(md5(stream_get_contents($feedHandle), true)), 'FeedType' => '_POST_FLAT_FILE_INVLOADER_DATA_', 'MarketplaceIdList' => $marketplaceIdArray, My authentication and marketplace data are all correct.įeed data is in $_feed and I am creating the feed datastream from the api with $feedHandle = fopen('php://temp', 'rw ') Īnd submitting it with the example code from Amazon $marketplaceIdArray = array("Id" => array(MARKETPLACE_ID)) Submitting the same flat file using the SubmitFeed sample from the API I always get an "incorrect template type error". I can submit my generated inventory loader flat file manually via the seller central upload inventory gui without errors. I am working with the Amazon MWS PHP MarketplaceWebService PHP API to submit inventory feed data to Amazon.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |