We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd0b237 commit 9b9d807Copy full SHA for 9b9d807
app/Jobs/HandleCustomerSubscriptionCreatedJob.php
@@ -8,6 +8,7 @@
8
use Illuminate\Foundation\Bus\Dispatchable;
9
use Illuminate\Queue\InteractsWithQueue;
10
use Illuminate\Queue\SerializesModels;
11
+use Illuminate\Support\Facades\Log;
12
use Laravel\Cashier\Cashier;
13
use Laravel\Cashier\Events\WebhookHandled;
14
use Laravel\Cashier\SubscriptionItem;
@@ -29,6 +30,12 @@ public function handle(): void
29
30
return;
31
}
32
33
+ if ($stripeSubscription->status !== 'active') {
34
+ Log::info("The subscription for customer [{$stripeSubscription->customer}] is not active. Not proceeding to license creation.");
35
+
36
+ return;
37
+ }
38
39
/** @var User $user */
40
$user = Cashier::findBillable($stripeSubscription->customer);
41
0 commit comments