not getting webhook post request json data in my laravel controller

Solutions on MaxInterview for not getting webhook post request json data in my laravel controller by the best coders in the world

showing results for - "not getting webhook post request json data in my laravel controller"
Abril
29 Oct 2016
1public function handle(Request $request) {
2  
3  if(! $request->has('id') ) {
4    return ;
5  } // <-- don't forget this check
6
7  $payment = Mollie::api()->payments()->get($request->id);
8
9  if($payment->isPaid()) {
10    $donate = Donate::where('payment_id', $request->id)->firstOrFail();
11    $donate->payment_status = "Paid";
12    $donate->save();
13  }
14}