app->singleton(PaymentGatewayFactory::class, function (): PaymentGatewayFactory { $factory = new PaymentGatewayFactory; $factory->register(PaymentMethod::KbzMiniApp, KbzMiniAppGateway::class); return $factory; }); } public function boot(): void { // MarkBookingPaid/MarkBookingRefunded are auto-discovered by // internachi/modular's EventsPlugin (any Listeners/*.php with a // handle(SomeEvent $event) signature) — registering them here too // used to double-dispatch both listeners (see DriverAssigned's // BookingServiceProvider for the same fix). Payment::observe(PaymentObserver::class); } }