how to complete a checkout?

Zia_Web
Tourist
6 0 1

hi everyone

I'm new in graphql,

I'm developing a mobile app in ionic I used this https://www.npmjs.com/package/shopify-buy resource to create checkout and add some items, now I want to complete the checkout, when I redirect to webUrl I get this errors:

1)  my website customer login page loads.

2) No 'Access-Control-Allow-Origin' header is present on the requested resource.

Access to XMLHttpRequest at 'https://sdk.beeketing.com/shop/bmF3cm9vei5teXNob3BpZnkuY29t.json' from origin 'https://nawrooz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

please help someone

thank you

 

 

samullman
Tourist
10 3 3

+1

let req = new XMLHttpRequest()
req.open( "GET", context.state.checkout.webUrl  )
req.setRequestHeader("X-Shopify-Customer-Access-Token", window.localStorage.shopifyAccessToken);
req.setRequestHeader("Access-Control-Allow-Origin", "*");
req.send();
0 Likes