Skip to content

Commit 52171f6

Browse files
committed
refact: subscription user notification
1 parent 0cc4ee7 commit 52171f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Domains/Connectors/Stripe/Traits/CashierWebhookTrait.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Notifications\Notifiable;
88
use Illuminate\Support\Carbon;
99
use Kanvas\Subscription\Subscriptions\Models\AppsStripeCustomer;
10+
use Kanvas\Workflow\Enums\WorkflowEnum;
1011
use Laravel\Cashier\Cashier;
1112
use Laravel\Cashier\Payment;
1213
use Laravel\Cashier\Subscription;
@@ -70,6 +71,17 @@ protected function handleCustomerSubscriptionCreated(array $payload): string
7071
}
7172
}
7273

74+
if (method_exists($user, 'fireWorkflow')) {
75+
$user->ireWorkflow(
76+
WorkflowEnum::CREATE_SUBSCRIPTION->value,
77+
true,
78+
[
79+
'app' => $participant->lead->app,
80+
'company' => $participant->lead->company,
81+
]
82+
);
83+
}
84+
7385
return $this->successMethod();
7486
}
7587

0 commit comments

Comments
 (0)