Django 4.0 Paypal Integration Issue

Paypal client-side integration is not working in Django 4.0. It’s working properly in version 3.2. In the current version, when the user clicks the pay now button it opens a new blocked window. The window is empty. Django blocks it. I checked the application with the old version. I found no issues there. Please help me. Should I change CORS settings?

What integration library are you using?
There isn’t one provided in Django, so it must be a third-party library.
Is it listed as being Django 4.0 compatible?

I copied the code from PayPal. It is a simple Javascript integration. Actually, the problem is not with the integration. I tried to integrate another payment gateway as well, and Django doesn’t allow opening a new window from those third parties.

I don’t think the issue is with Django. I integrated Paypal with my Django 4.0 project and everything worked just as it was in the previous version of Django. Review your code.

Found answer. It’s a new feature of Django 4.0. Set SECURE_CROSS_ORIGIN_OPENER_POLICY='same-origin-allow-popups' in your setting.py and everything should work well.

1 Like

even after adding that line to my settings.py , that issue is not resolved for me for django 4.2.13