When Mollie fires the webhook, no PaymentUpdated event is fired. I am not sure we are doing something wrong. Maybe the event is supposed the fire when a database update is made on the Payment model. Because the PaymentUpdated event is not fired, the different event types depending on the payment status are not fired.
public function handle(Request $request)
{
$payment = Payment::where('gateway_payment_reference', $request->id)->firstOrFail();
$paymentGateway = new $payment->gateway_name;
$paymentGateway->fetchUpdateFor($payment);
event(new PaymentUpdated($payment));
return response()->json(null, 200);
}
How should the event normally be emitted.