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}