paypal-donate

Here is a "Donate" (in german "Spenden" ) Button of MY paypal account… if you want to donate to ME something ( wow !) - this is only a test - but this is a REAL Paypal Button and leads to the payment screens of Paypal..

From http://community.wikidot.com/forum/t-423434/paypal-donate-button-not-working#post-1341113 :
Re: PayPal Donate button not working
michal frackowiak 3 Jan 2012, 09:33 GMT+01
in discussion Help / General support requests » PayPal Donate button not working
Hi,

this is not really a Wikidot bug, so I will answer here instead of the Feedback site. I do have a solution, and I know why it happens :-)

Once you click the Donate button, Paypal sends a response a header X-Frame-Options: SAMEORIGIN, which means the content can be displayed only if the source of the iframe (which is now a response from paypal.com) and the main page itself (wikidot.com or wdeditor.com in this case) are the same. Well, they are not.

Now, the solution (which I wonder why is not being used by PayPal) is to slightly modify the Donate button code by adding an extra attribute target="_top", which makes the PayPal response to be loaded in the main window instead of the iframe:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">

You can also use target="_blank" if you want to open a new tab/window.

target="_top" should be included by default in the PayPal code to prevent issues like this one. Perhaps there is a reason for it, but I do not see it.

I hope the solution works for you, but it is a pity you need to alter the code manually. Thus every new user will face the same issue if he/she wants to use donate buttons :-/

Cheers!


Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalf.me



standard - live "_template" used without any tricks and layout changes…