Using Payment Window inside iframe
Due to the nature of our integration, we need to render Payment Window inside an iframe. This iframe renders the payment windows calling another application so the iframe and the content are in different domains.
This is problematic in PC as the redirection tries to change the parent location (parent of the content is the window where the iframe is rendered), but due to cross origin policy, Toss Payment Window cannot change the location of the parent.
We get "Failed to set the href property on Location: The current window does not have permission to navigate the target frame to {successUrl}.
Is it possible to detect when Toss Pay Payment window will perform a redirection so we can pass the redirection url to the parent iframe and the parent do the redirection?
Thanks.
5 Replies
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) :
- 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요.
* 주말/공휴일에는 답변이 늦을 수 있어요.
you can use "windowTarget" : "self"
Would there be any way to keep it in iframe mode but detect the redirection and allow me to handle the redirection? 🙂
you can create your own iframe then call the payment window inside of it.
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.