The SubscriptionUpdated event and SubscriptionCancelled does not seem to work in laravel spark stripe (v1.1.8), while SubscriptionCreated does work.
My Listener:
<?php
namespace App\Listeners;
use Domain\Zoho\Actions\SubscriptionUpdatedWebhook;
use Illuminate\Support\Facades\Log;
use Spark\Events\SubscriptionUpdated;
class SubscriptionUpdatedToZoho
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
public function handle(SubscriptionUpdated $event)
{
Log::channel('slack')->critical('SubscriptionUpdated action called');
}
}
and my EventServiceProvider.php
<?php
namespace App\Providers;
use App\Listeners\SubscriptionCancelledToZoho;
use App\Listeners\SubscriptionCreatedToZoho;
use App\Listeners\SubscriptionUpdatedToZoho;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Spark\Events\SubscriptionCancelled;
use Spark\Events\SubscriptionCreated;
use Spark\Events\SubscriptionUpdated;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
SubscriptionCreated::class => [SubscriptionCreatedToZoho::class],
SubscriptionUpdated::class => [SubscriptionUpdatedToZoho::class],
SubscriptionCancelled::class => [SubscriptionCancelledToZoho::class],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
//
}
}
I was wondering if someone knows why this does not work and can help me fix it. Thanks in advance.