#suchishah.
1 messages · Page 1 of 1 (latest)
Hi
What Stripe Integration are you using ?
the thing is, window.open and window.location.href is not working due to security reason
Can you share more details about this please ?
I am implementing stripe app by using stripe components
I mean Stripe Link, Checkout or ELement?
There is an external url which needs to be redirected by clicking on Button
what is blocking you from dowing that ?
I have this button But when I am using window.open to redirect, I got this error "Refused to frame 'https://host-cloudflare-worker.hrana.workers.dev/' because it violates the following Content Security Policy directive: "frame-src 'self'"
What Stripe product are you using there ?
It just redirects to some html content
Just need to know how am I going to redirect to some external Url?
Sorry, but I don't understand what is the link with Stripe APIs.
You probbaly need to reachout to the maintainer of that website that you want to load inside an iframe
It is not about stripe APIs.
I am implementing stripe app with stripe UI elements.
I am using <Button href="/externalUrl">
https://stripe.com/docs/stripe-apps/components/button
Now the requirement is, After user submits successfully then I want to redirect to '/externalUrl'
by programatically
I am using window.location but not working due to security reasons and got error "Refused to frame '/externalUrl' because it violates the following Content Security Policy directive: "frame-src 'self"
I am using window.location but not working due to security reasons and got error "Refused to frame '/externalUrl' because it violates the following Content Security Policy directive: "frame-src 'self"
That's an issue on your External Url and not Stripe Side
that website is blocking you from loading that page inside an Iframe
So, what should I do?
You need to check with the maintainer of that website and see why you can't open it in iframe
it has no link with Stripe Apps
You see what I mean
that website is blocking and not Stripe App
Blocked opening '/externalUrl' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.
What about this error?
But the thing is, I don't want to redirect on button click. I call an api on button and after getting success response, I want to redirect to another page.
You can make the APi call in another tab too