The paypal guide is very confusing. I want to add a donate button to my templates on my development machine for testing. The guides point to creating a donation button from their website, which I have done (modified a bit to accept a custom donation amount):
<form id="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="amount" value="33">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----xxxxxxx=-----END PKCS7-----
">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
When I click on the donate button, it redirects to paypal but then I see this error:
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.
But I have already confirmed my email. I also read about creating sandbox accounts, so I went to https://developer.paypal.com and created a test app. It gives me sandbox credentials, but I don't see what this has to do with integrating a donations button.
This SO post suggests providing my plaintext Merchant ID for the business value. But then what is my encrypted value for? Doesn't that contain my Merchant ID? Why do I have to provide my plaintext Merchant ID if I have my encrypted value? And why doesn't Paypal generate the correct HTML if I have to use my plaintext Merchant ID?
If I switch cmd to _s-xclick and leave out the plaintext Merchant ID in business, then it works fine, but my custom amount is empty on paypal's page. Somehow paypal loses this piece of info.
What am I doing wrong?