#aabycereno
1 messages · Page 1 of 1 (latest)
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.
- aabycereno, 3 hours ago, 18 messages
- aabycereno, 3 days ago, 9 messages
How can we help?
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.
You can't redirect using XMLHttpRequest. You should redirect "directly" using serverside
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
Yes that's the XMLHttpRequest. Stripe Checkout doesn't work with it. It needs to be a direct request
👋
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
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
ok thank you