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.