Embed PayPal in an IFRAME

2019-02-08 10:05发布

Is it possible to embed paypal in an IFRAME. I have tried to do this but it just came back a blank page as if there was nothing on it. I dont want to use adaptive payments. Is this possible?

Thanks

3条回答
时光不老,我们不散
2楼-- · 2019-02-08 10:52

They are probably prohibiting it by setting the X-FRAME-OPTIONS header. It's a security measure and there is no way to work around it.

If you have a payment running through PayPal, you can provide a "back to site" link - that's all you can do.

查看更多
Animai°情兽
3楼-- · 2019-02-08 10:55

You can host PayPal in an iframe only with Adaptive Payments for Digital Goods / Express Checkout for Digital Goods (kind of), Hosted Solution (hosted Website Payments Pro, not currently available in the US), Payflow Pro, and Payflow Link.

You cannot host Website Payments Standard checkout pages in iframes. As Pekka stated, PayPal does set the X-FRAME-OPTIONS header.

查看更多
干净又极端
4楼-- · 2019-02-08 10:57

No way to get around the same origin policy.

A way around this is to create an anchor tag in the iframe:

<a href="<?=$paypal_redirect?>" target="_blank">Continue Checking out</a>
or
<a href="<?=$paypal_redirect?>" target="_top">Continue Checking out</a>

The above will only allow the continuation of the checkout process in another tab/window; it will not process the checkout within your iframe.

查看更多
登录 后发表回答