laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

laravel/cashier webhook does not work properly on lumen #1122

Closed jhayg12 closed 3 years ago

jhayg12 commented 3 years ago

Description:

Hi there,

I'm trying to extend the WebhookController of the laravel/cashier package and listen to some events that were not included in the default events. But when I tried to test a webhook call from the Stripe Dashboard it returns the error below:

image

<b>Fatal error</b>:  Trait 'Illuminate\Foundation\Events\Dispatchable' not found in <b>/var/www/html/vendor/laravel/cashier/src/Events/WebhookReceived.php</b> on line <b>8</b><br />
<!-- Trait 'Illuminate\Foundation\Events\Dispatchable' not found (500 Internal Server Error) -->

It seems it's looking for the Dispatchable trait on the Lumen Framework

Steps To Reproduce:

  1. Add the webhook URL on the stripe dashboard
  2. Try to send some test webhooks and check the response.
driesvints commented 3 years ago

We don't support any of the 1st party packages on Lumen. Please see our support policy and use Laravel if you need Cashier.