Paypal within iFrame on Facebook

1.2k views Asked by At

Double iframe here. Within the Facebook Canvas iframe, we're iframing another window to starbucks.com for our egifting section. Problem is, and what use to work, the paypal button will no longer break out of the iframes and render their page before being submitted and back into the iframes. Example, visit https://apps.facebook.com/starbuckscard/ and select paypal as an option when you get to it. This use to work ... any idea on why or what's broken/changed??? Any feedback much appreciated. Thank you.

2

There are 2 answers

3
Robert On BEST ANSWER

All PayPal URL's will break out of iframes, or return an error depending on whether the browser adheres to X-FRAME-OPTIONS which is set for all pages (including Website Payments Standard) to SAMEORIGIN.

You'd want to use PayPal Website Payments Pro Hosted Solution instead, which allows itself to be embedded within an iframe.

1
Yaniv Vova Alterman On

You can do transactions on server side as well. Here is full REST API docs and examples: https://developer.paypal.com/webapps/developer/docs/api/