update payment webhook
This commit is contained in:
parent
e8a41d7e6e
commit
67edce0612
@ -262,7 +262,10 @@
|
|||||||
break;
|
break;
|
||||||
case 'invoice.payment_failed':
|
case 'invoice.payment_failed':
|
||||||
$customerId = data_get($data, 'customer');
|
$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);
|
SubscriptionInvoiceFailedJob::dispatch($subscription->team);
|
||||||
break;
|
break;
|
||||||
case 'customer.subscription.updated':
|
case 'customer.subscription.updated':
|
||||||
|
Loading…
Reference in New Issue
Block a user