Get Your Paypal Donation Button to Validate
Having trouble getting you Pay Pal Donate Button to validate properly? I have read a few people having such problems after doing a search to try to fix my own.
Not one of the sources offered any advice that worked for me, or the article was written too long ago to be relevant any longer.
Please check the code below. Example #1 is a code suggested by Pay Pal. Not the one that I got through the step by step create a button process. It was even worse. This code was posted under advanced. A whole lot of errors come up when I try to validate this block. Enough to make me think I didn’t really want it on my page.
SO with a little luck and trial and error I got mine to validate! Remember if you try this to replace the coloured text below with you own email and company name as registered with Pay Pal
Example #1 - does not Validate
<form name=”_xclick” action=”https://www.paypal.com/row/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_xclick”>
<input type=”hidden” name=”business” value=”yourname@yourmail.com“>
<input type=”hidden” name=”item_name” value=”Your Company“>
<input type=”hidden” name=”currency_code” value=”CAD”>
<input type=”hidden” name=”amount” value=”0″>
<input type=”image” src=”http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif” border=”0″ name=”submit” alt=”Make payments with PayPal - it’s fast, free and secure!”>
</form>
It turns out fixing it is easy than I first thought. All lines that began with the tag <input> need a closing tag after each line, not just one at the end of the block. Maybe there is another way to do this but it worked for me. I also had to remove the line: border=”0″, I do not know if it was as a result of my css style sheet, so is specific to my case, or if this is a problem for all.
Example #2 - Validates
<form name=”_xclick” action=”https://www.paypal.com/row/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_xclick”></input>
<input type=”hidden” name=”business” value=”yourname@yourmail.com“></input>
<input type=”hidden” name=”item_name” value=”Your Company“></input>
<input type=”hidden” name=”currency_code” value=”CAD”></input>
<input type=”hidden” name=”amount” value=”0″></input>
<input type=”image” src=”http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif” name=”submit” alt=”Make payments with PayPal - it’s fast, free and secure!”>
</input>
</form>













What do you think? Leave a comment. Alternatively, write a post on your own weblog; this blog accepts trackbacks.
Leave a Reply