too long

I am trying to integrate the amazon payment gateway. I downloaded the following library from amazon.com: amazon-fps-2010-08-28-php5-library

I followed the same instructions as it was mentioned in the readme.html. After configuring the code under CBUI folder I tried running CBUISingleUsePipelineSample.php file and I got a url which I then tried opening in other page. however it threw an error as:

amazon payments
Invalid Request

We cannot process your payment request because of an error. Please contact the website where you initiated this payment.

Caller Input Exception: Invalid Signature

There are three things of note to keep track of while forming your signature/URL...

1.It seems that the parameter "transactionAmount" is necessary for a valid Co-branded UI Pipeline, even though there's no specific instruction alluding to the issue.

2.If any of your parameters have/had spaces in them, and you tried to use html_build_query() in all but the latest (5.4) version of PHP, you would be given an encoding scheme that featured "+" marks for spaces instead of "%20" which is what Amazon appears to like. My code above takes care of that by implementing rawurlencode() on the entire parameter array.

3.The ordering of the parameters is paramount in the construction of the signature. The keys (not the values) need to be in case-insensitive alphabetical order. It's also worth noting that despite what the documentation says for the API, both the ampersands (&) and the equals (=) must be present in the creation of the query string for the signature.

Please refer Amazon Flexible Payments Exception: Caller Input Exception: Invalid Signature