My preferred solution is to make a fix through Javascript.
As indicated in other answers, the problem is that the PayPal button is embedded in the .Net form, preventing the PayPal form from sending to the right place.
To get around this, the PayPal form element can be removed, and Javascript can be used to change the action of the .Net form to point to PayPal, and then submit by click.
The following changes must be made to the source code:
- <form> tags removed.
- The input image of the sending has changed to the tag 'img'
- Onclick is added to the main image, first changing the form's action to point to PayPal, and secondly by submitting the form.
- Added cursor: pointer style to keep button look
PayPal Button Code Result:
<input type="hidden" name="cmd" value="_s-xclick" <input type="hidden" name="hosted_button_id" value="xxxxxxxx"> <img style="cursor:pointer;" alt="PayPal – The safer, easier way to pay online." border="0" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_subscribeCC_LG.gif" onclick="document.forms[0].action='https://www.paypal.com/cgi-bin/webscr';document.forms[0].submit();" /> <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
source share