Facebook 上 iFrame 内的 Paypal
这里是双 iframe。在 Facebook Canvas iframe 中,我们为 starbucks.com 的电子礼品部分构建了另一个 iframe 窗口。问题是,paypal 按钮在提交并返回 iframe 之前将不再脱离 iframe 并呈现其页面,这有什么用处。例如,访问 https://apps.facebook.com/starbuckscard/ 并选择 paypal 作为选项你会做到的。这有用...任何关于为什么或什么被破坏/改变的想法吗?非常感谢任何反馈。谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所有 PayPal URL 都将脱离 iframe,或返回错误,具体取决于浏览器是否遵守为所有页面(包括网站付款标准)设置为
SAMEORIGIN< 的
X-FRAME-OPTIONS
/代码>。您需要使用 PayPal Website Payments Pro Hosted Solution,该解决方案允许将自身嵌入到 iframe 中。
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) toSAMEORIGIN
.You'd want to use PayPal Website Payments Pro Hosted Solution instead, which allows itself to be embedded within an iframe.
您也可以在服务器端进行交易。
以下是完整的 REST API 文档和示例:
https://developer.paypal.com/webapps/developer/docs/api/
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/