update payment webhook
This commit is contained in:
		| @@ -262,7 +262,10 @@ Route::post('/payments/stripe/events', function () { | |||||||
|                 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': | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai