Do you get the same response if you include the accept header as application/json so laravel wont redirect if an error occurs?
Half JS Half PHP 100% Laravel issue....
I'll start by linking my GIST . https://gist.github.com/pdxbenjamin/86b956e33699570da3d3f62fffa68a13
The issue is simple, I have a simple .ajax POST request in a js file. I have a simple function in a Controller. When I make my .ajax post request to the function in the Controller I get a 302 "Found" response header.
Why this is a problem for me? In the .ajax request always hits the ERROR switch, and I am unable to provide ajaxy feedback.
Does anyone know why that is happening, and how to fix it?
I'm trying to get this Stripe button working... if that helps. https://stripe.com/docs/checkout#integration-custom
Here are my Chrome Dev Tools Network tab results of a successful submission of the Stripe Button.
Where my .ajax post is going....
Request URL:http://localhost.dev/join
Request Method:POST
Status Code:302 Found
Remote Address:127.0.0.1:80
The page with a button...
Cache-Control:no-cache
Connection:keep-alive
Content-Type:text/html; charset=UTF-8
Date:Wed, 07 Dec 2016 03:25:52 GMT
Location:http://localhost.dev/register
Server:nginx/1.10.2
Please or to participate in this conversation.