amzon SP-API ,The request signature we calculated does not match the signature you provided

Errors appear when I encrypt and upload the feed data

the document link :https://github.com/amzn/selling-partner-api-docs/blob/main/guides/use-case-guides/feeds-api-use-case-guide-2020-09-04.md#step-2-encrypt-and-upload-the-feed-data

I develop in php,and the composer is composer require double-break/spapi-php

$feeder = new Feeder();
$feeder->uploadFeedDocument($docPayload, 'text/plain; charset=utf-8',
        //ROOT_PATH.'uploads/amz/'.$feedFileName
        'https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/OrderAcknowledgement.xsd'
    );

Errors appear when I encrypt and upload the feed data:

enter image description here


Make sure content type you pass to createFeedDocument matches exactly the content type you pass to Feeder::uploadFeedDocument. In my case I was passing text/tab-separated-values to the former but text/tab-separated-values; charset=UTF-8 to the latter (with charset appended) and was getting the error you're describing. I fixed it by passing text/tab-separated-values; charset=UTF-8 in both instances.