How to Form POST to Paypal from WinJS iframe Windows 8 App?

☆樱花仙子☆ 提交于 2019-12-05 11:03:44

Paypal will block the form POST to the new window when launched from an iframe in the Windows 8 App. The result is you see the Paypal homepage instead of the purchase order form.

I can confirm that simply switching the form method to GET and using a target="_blank" works perfectly without issue:

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

Another way around this issue within the iframe is to use a standard anchor tag around text or an image and manually create the URL like so:

<a href="https://www.paypal.com/cgi-bin/webscr?custom=[custom info]&item_name=[URL encoded name]&item_number=[num]&amount=9.95&currency_code=USD&cmd=_xclick&business=[paypal email address]&return=[URL encoded URL]">Buy Now</a>

The credit for this answer goes to this page about Paypal links instead of buttons.

I don't think paypal allows iframe support. They most likely use this:

X-Frame Options

It allows them to detect if the page is rendered in a iframe and if so prevent it loading..(aka show blank page) like you are experiencing.

And there is no way around this.

Johan Nordberg

I had a similar issue with PayPal and a Windows Store app. I just posted my solution to the problem in this thread:

Windows Store HTML app with popup window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!