This implementation will not work when your application is not eager loading (like in dev mode).
Your initializers are eager loaded. Anything in your "app" directory is auto loaded.
So you will most likely see errors in your webhook handlers that Stripe::InvoiceEventHandler cannot be reinitialized and is already in the constants tree.
You must move all event handlers to /lib if you want this. The issue then, is autoloading changes to these event handlers in dev mode.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This implementation will not work when your application is not eager loading (like in dev mode).
Your initializers are eager loaded. Anything in your "app" directory is auto loaded.
So you will most likely see errors in your webhook handlers that Stripe::InvoiceEventHandler cannot be reinitialized and is already in the constants tree.
You must move all event handlers to
/lib
if you want this. The issue then, is autoloading changes to these event handlers in dev mode.