#aabycereno

1 messages · Page 1 of 1 (latest)

carmine minnowBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rough marsh
#

How can we help?

wide summit
#

Access to XMLHttpRequest at 'https://checkout.stripe.com/c/pay/cs_test_b1sj86xOHUXoHIKJluOtCyEFmZkQJsoyUNT7uIIhqM3mgNP3o8tfnqVXZJ#fidkdWxOYHwnPyd1blpxYHZxWjA0S0htRHBOTFNkMzF1MmB2d2lsVmw8MzdKNWpnYEdKZmRSNm1KT1J0VENnZm5hQlY1PDxOT259M3NyTzNpdFM3S1JCQDJSNEE9ajBTVEBIREFqPWBrTn9DNTViRDxxVF0xRycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPydocGlxbFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl' (redirected from 'http://localhost:8000/api/checkout') from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

do I need to add headers or something? the link is good, its just its not opening in a new tab.

rough marsh
#

You can't redirect using XMLHttpRequest. You should redirect "directly" using serverside

wide summit
#

yeah thats what im trying to do

rough marsh
#

You probably call this as an XMLHttpRequest

#

it can only be a direct POST request

wide summit
#

im calling it thru post tho.. let me show you.

#

so when I click the checkout button, axios.post is triggered, going thru the route in my laravel, and using the stripecontroller

rough marsh
#

Yes that's the XMLHttpRequest. Stripe Checkout doesn't work with it. It needs to be a direct request

rough marsh
#

👋

wide summit
#

so i cant react->laravel API->stripe

#

it should be react->stripe?

#

what if i just install stripe in my react app, then wait for the session ID from my laravel backend, then use stripe redirect from react with the session id

rough marsh
#

Not sure about the Laravel API, sorry not familiar to it, but the issue here is to use a form, not an AJAX request

#

There is a stripe redirect method from JS, but still better to use the form

wide summit
#

ok thank you