All things Shopify and commerce
Greetings,
I want to attach a js script inside the thank you page, i want to redirect the user to a custom payment gateway.
This is the snippet:
analytics.subscribe('checkout_completed', (event) => { const checkout = event.data.checkout; console.log(event); console.log(checkout); console.log(checkout.transactions[0].gateway); if(checkout.transactions[0].gateway == 'bogus') { parent.document.location = URL_HERE; } });
It says: Uncaught (in promise) DOMException: Permission denied to access property "document" on cross-origin object
How can i achieve what i want ? Thank you
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025