From 97aa0fa60c8c83b2b02d06a37cbe0b4b74cbb8bd Mon Sep 17 00:00:00 2001 From: Abishek R Srikaanth Date: Sun, 6 Aug 2023 16:58:24 +0530 Subject: [PATCH] Dispatching the correct event name when a license is created (#35) --- src/Http/Controllers/WebhookController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/WebhookController.php b/src/Http/Controllers/WebhookController.php index d87b47b..b665d00 100644 --- a/src/Http/Controllers/WebhookController.php +++ b/src/Http/Controllers/WebhookController.php @@ -18,6 +18,7 @@ use LemonSqueezy\Laravel\Events\SubscriptionResumed; use LemonSqueezy\Laravel\Events\SubscriptionUnpaused; use LemonSqueezy\Laravel\Events\SubscriptionUpdated; +use LemonSqueezy\Laravel\Events\LicenseKeyCreated; use LemonSqueezy\Laravel\Events\WebhookHandled; use LemonSqueezy\Laravel\Events\WebhookReceived; use LemonSqueezy\Laravel\Exceptions\InvalidCustomPayload; @@ -201,7 +202,7 @@ private function handleLicenseKeyCreated(array $payload): void { $billable = $this->resolveBillable($payload); - OrderRefunded::dispatch($billable, $payload); + LicenseKeyCreated::dispatch($billable, $payload); } /**