#gabrielctavares

1 messages · Page 1 of 1 (latest)

spice riverBOT
mystic pilot
#

Sure, which code are you using to redirect to the Checkout page?

spice riverBOT
vast sequoia
#
                var service = new SessionService();
                Session session = service.Create(options);

                Response.Headers.Add("Location", session.Url);
                return new StatusCodeResult(303);```
neon notch
#

Thank you, looking in to what may cause that error

#

Are you able to do other 303 redirects from your server like this?

#

The solutions that I am seeing here mostly involve including that header or using a CORS proxy https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe

vast sequoia
#

StackOverflow couldn't help me, as far as I found, the Stripe api does not accept "Access-Control-Allow-Origin"

#

ChatGpt response: In your case, it seems that you're making a request from 'http://localhost:8100' to 'https://checkout.stripe.com', but the server at Stripe is not returning the 'Access-Control-Allow-Origin' header in its response. This header is required to explicitly allow requests from specific domains.

neon notch
#

I don't think the issue is with the Stripe API per se, it is the response from your server that is triggering the error. The call to the Stripe API isn't necessarily affecting this.

#

I will see if any of my colleagues have a stronger idea of how to fix this CORS error

vast sequoia
#

ok, my api is running on localhost:44336 and the app is localhost:8100, the api code is the same as the documentation example and the app is running on ionic/angular

raw sluice
#

Hello 👋
Taking a look here