Error Payments in Paypal iframe problem can't take payment on website

Vitaliy_Kvachen
Contributor
Contributor

Hello.

We have several sites, the experience in connecting payments from PayPal is available.

 

12.PNG

 

 

We created a new site, we decided to use it - <iframe> at the same time, when the client reaches the shopping cart, then he moves and chooses to pay through the sandbox, he throws it into the sandbox.

 

In the sandbox where there is a check, PayPal is constantly frozen, payment is not working and the client is hanging.
If you use a direct link, without <iframe> everything works!

 

Tell me why payment from PayPal does not work in iframe?

 

Thank you.

 

1.PNG

 

 

 

Login to Me Too
3 REPLIES 3

Anonymous_User
Not applicable

I believe that using frames may be the reason however, you may want to check with Tech Support.   A long time back PayPal did not allow the use of their payment pages to be displayed inside of a "Frame" but, I'm not sure if that is still valid so it's best to contact Tech Support.   Look for the link at the bottom of the page that says "Contact Support".

Login to Me Too

MTS_joaquim
Moderator
Moderator
Hello,

Unfortunately, PayPal only supports iframe integration on the following solutions :
PayPal Digital Goods
PayPal Payments Advanced
PayPal Payments Pro
PayPal Payments Pro Hosted Solution

Source : https://www.paypal.com/us/selfhelp/article/can-i-place-paypal-in-a-frame-or-iframe-on-my-site-ts1191

The best here would be to extract your integration with an iframe and do a full page redirect instead.

Was my answer helpful? If so, please leave me a Kudo to help it being visible on the community!
Login to Me Too

Vitaliy_Kvachen
Contributor
Contributor

For the solution, we decided to try PayPal plus using .js

 

 If you need an example of using PayPal Plus.

 

Link 1 pdf New_PayPal_PLUS_IntegrationGuide.pdf

 

Link 2 pdf New_PayPal_PLUS_IntegrationGuide.pdf

 

When you connect the paypal Plus, then the script itself will be ejected from the iframe on the desired URL.

 

Examle image.

1.PNG

 

  But next step. It is necessary to study this script.

 https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js

 

 You just need to change the url to the address you need in the address bar of the window.

 

 Result:

 

  window.parent.location.replace('<?=$paypal_tansaction_redirect_link;?>');

 

 If you connect this line, then you can get rid of the iframe when you need to use .js.

 

Be sure to configure when transferring data, back links to your site.

 

Examle:

 

              $cancel_url = HTTP_SERVER. '/kasse.php?Token='.$token_from_basket.'&payment=error';
              $return_url = HTTP_SERVER. '/kasse.php?Token='.$token_from_basket.'&payment=plus';

 

I hope someone helped get rid of the iframe.

 

Thanks

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.