About using PayPal within Stripe or Paddle Payments
Paying with PayPal might open a blank dialog window when using Stripe or Paddle payment gateways. To fix this, make sure to set Cross-Origin-Opener-Policy
to "unsafe-none".
In Django project settings, set:
MIDDLEWARE = [
# ...
"django.middleware.security.SecurityMiddleware",
]
SECURE_CROSS_ORIGIN_OPENER_POLICY = "unsafe-none"
Or set it just to the views which open your payments for better security:
response.headers["Cross-Origin-Opener-Policy"] = "unsafe-none"
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You