Trying to add a paypal button to a website (using Umbraco 4) and having the issue of it just refreshing when clicked and not doing anything else. I understand there are problems with forms within a form etc? I've read quite a few forum posts/solutions and tried a few things with the button code without any luck.
Wondering if anyone can help?
I can get around my site for basic things (updates etc) but fairly novice with any serious coding..
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="X2XJBBVJW53AJ"> <table> <tr><td><input type="hidden" name="on0" value="Choose Postage Option">Choose Postage Option</td></tr><tr><td><select name="os0"> <option value="'Ain't Coming Back To You' CD + postage within Australia">'Ain't Coming Back To You' CD + postage within Australia $17.00 AUD</option> <option value="'Ain't Coming Back To You' CD + postage outside Australia">'Ain't Coming Back To You' CD + postage outside Australia $20.00 AUD</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="AUD"> <input type="image" src="https://www.paypalobjects.com/en_AU/i/btn/btn_buynowCC_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_AU/i/scr/pixel.gif" width="1" height="1"> </form>
This code didn't work properly because it is in the basic asp.net form. You have to create post to the https://www.paypal.com/cgi-bin/webscr manually or create page without <form runat="server"></form> and post this form )
Paypal button problem...form??
Hi Guys,
Trying to add a paypal button to a website (using Umbraco 4) and having the issue of it just refreshing when clicked and not doing anything else. I understand there are problems with forms within a form etc? I've read quite a few forum posts/solutions and tried a few things with the button code without any luck.
Wondering if anyone can help?
I can get around my site for basic things (updates etc) but fairly novice with any serious coding..
Thanks,
Nick
Hi Nick,
Do you have UpdatePanel on your page ?
THanks,
Alex
Hey Alex,
Thanks for the reply mate. Umm don't think so? Had a bit of a look...where would that be?
Nick
What type of Paypal button do you use? Could you give the code ?
Alex
Here you go mate......
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="X2XJBBVJW53AJ">
<table>
<tr><td><input type="hidden" name="on0" value="Choose Postage Option">Choose Postage Option</td></tr><tr><td><select name="os0">
<option value="'Ain't Coming Back To You' CD + postage within Australia">'Ain't Coming Back To You' CD + postage within Australia $17.00 AUD</option>
<option value="'Ain't Coming Back To You' CD + postage outside Australia">'Ain't Coming Back To You' CD + postage outside Australia $20.00 AUD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="AUD">
<input type="image" src="https://www.paypalobjects.com/en_AU/i/btn/btn_buynowCC_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_AU/i/scr/pixel.gif" width="1" height="1">
</form>
This code didn't work properly because it is in the basic asp.net form. You have to create post to the https://www.paypal.com/cgi-bin/webscr manually or create page without <form runat="server"></form> and post this form )
Alex
Thanks Alex.
Sorry to sound dumb but how do I do either of those? Just remove the form tags? or?
Nick
Here are some solutions:
http://stackoverflow.com/questions/8340752/paypal-form-inside-asp-net-form
Alex
It worked! Thanks so much Alex!
Now I just have to work out the code to get Paypal to open in a new window and I'm good.
Thanks again mate :)
Nick
You are welcome )
is working on a reply...