Sunday, April 16, 2017

Laravel clean way to handle data after a webhook

So I got webhooks working and I also got a source polling page where ajax checks the status of the payment.

But now I don't know how to handle the data in a clean way. I could post the data from a view to a controller but I don't like it that way. I could also change the webhooks to return to a route, but I don't know if that will mess stripe up, since it wont get a http 200 (ok) status.

So what is a clean way to deal with a customer after he paid? Where should I redirect him to and how can I make sure my controller gets the user data after he paid.



via Jozzy91

Advertisement