mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-03 04:46:18 +00:00
update payment webhook
This commit is contained in:
1 parent
e8a41d7e6e
commit
67edce0612
1 file changed
+4
-1
+4
-1
@@ -262,7 +262,10 @@ Route::post('/payments/stripe/events', function () {
|
||||
break;
|
||||
case 'invoice.payment_failed':
|
||||
$customerId = data_get($data, 'customer');
|
||||
$subscription = Subscription::where('stripe_customer_id', $customerId)->firstOrFail();
|
||||
$subscription = Subscription::where('stripe_customer_id', $customerId)->first();
|
||||
if (!$subscription) {
|
||||
return;
|
||||
}
|
||||
SubscriptionInvoiceFailedJob::dispatch($subscription->team);
|
||||
break;
|
||||
case 'customer.subscription.updated':
|
||||
|
||||
Reference in new issue
Block a user