Here's the answer for anyone looking:
-
To disable cashier's routes: Add
Cashier::ignoreRoutes();in the boot method of your AppServiceProvider -
To fix the 500 error: When trying to override the Stripe Webhook job to perform custom logic as specified in https://github.com/spatie/laravel-stripe-webhooks#performing-custom-logic Use
use Spatie\StripeWebhooks\ProcessStripeWebhookJob;
class MyCustomStripeWebhookJob extends ProcessStripeWebhookJob
{
public function handle()
{
// do some custom stuff beforehand
parent::handle();
// do some custom stuff afterwards
}
}
You cannot have a __construct() function (which gets created by default if you run php artisan make:job) in this job, which will throw the 500 exception
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
Exception:
[2020-05-12 17:08:26] local.ERROR: Typed property Spatie\WebhookClient\ProcessWebhookJob::$webhookCall must not be accessed before initialization {"exception":"[object] (Error(code: 0): Typed property Spatie\WebhookClient\ProcessWebhookJob::$webhookCall must not be accessed before initialization at