Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
let req = new XMLHttpRequest()
req.open( "GET", context.state.checkout.webUrl )
redirecting to the Buy SDK webUrl with an associated customer and the request is being blocked by CORS ...
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx.myshopify.com/..... (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Have you tried redirecting the customer to context.state.checkout.webUrl, instead of using AJAX?
Scott | Developer Support @ Shopify - Was my reply helpful? Click Like to let me know! - Was your question answered? Mark it as an Accepted Solution - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog