Question

My goal is to integrate our website with Amazon Checkout. We have already interfaced with both google and paypal apis with minor issues. However, with Amazon we have tried their provided PHP code and tried using create a button. With the PHP code in the sandbox we can get to finalizing the order, but then it gives an error saying Payment Failed your debit card was not charged. In the seller central it gives no information at all that anything ever happen.

When trying to create a button with amazons tool, and changing the address to the sandbox address instead, it says you must send the payment to a verified e-mail address and account.

The account has a credit card on it, verified bank account, tax information completed and verified e-mail.

Has anyone else has similar issues with amazon? Is there an exciting non-amazon based project that has successfully interfaced with Amazon that can be used for a reference. Amazon's documentation is... lacking and all over the place.

<form action="https://authorize.payments-sandbox.amazon.com/pba/paypipeline" method="POST">
<input type="image" src="https://authorize.payments-sandbox.amazon.com/pba/images/payNowButton.png" border="0">
<input type="hidden" name="accessKey" value="MERCHANT_KEY_REMOVED">
<input type="hidden" name="amount" value="USD 1.1">
<input type="hidden" name="description" value="Test of the Vidya Amazon Payment Alpha">
<input type="hidden" name="recipientEmail" value="MERCHANT_EMAIL_REMOVED">
<input type="hidden" name="signatureMethod" value="HmacSHA256">
<input type="hidden" name="referenceId" value="2">
<input type="hidden" name="immediateReturn" value="0">
<input type="hidden" name="returnUrl" value="http://yourwebsite.com/return.html">
<input type="hidden" name="abandonUrl" value="http://yourwebsite.com/cancel.html">
<input type="hidden" name="processImmediate" value="1">
<input type="hidden" name="ipnUrl" value="REMOVED">
<input type="hidden" name="cobrandingStyle" value="logo">
<input type="hidden" name="collectShippingAddress" value="0">
<input type="hidden" name="fixedMarketplaceFee" value="0.01">
<input type="hidden" name="variableMarketplaceFee" value="4">
<input type="hidden" name="signatureVersion" value="2">
<input type="hidden" name="signature" value="REMOVED">
</form>
Was it helpful?

Solution

So here's the scoop. With immediate processing set to 1 you have to leave out the Fee fields, otherwise it will never be accepted.

These two need to be removed for it to work

<input type="hidden" name="fixedMarketplaceFee" value="0.01" />
<input type="hidden" name="variableMarketplaceFee" value="4" />

If you use AWS SimplyPay PHP files you have to remove the variables from all 3 files in order for them to work. Or set processImmediate = 0.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top