44 add blocking middleware payment failed (#4339)
* Add info ui component * Add info in billing settings * Add billing middleware * Handle subscription canceled webhook event * Stop deleting billingSubscription when subscription canceled * Handle subscription unpaid recovery * Handle subscription canceled status * Fix test * Add test * Fix test chatSupport display * Fix design
This commit is contained in:
@@ -38,9 +38,14 @@ export class BillingController {
|
||||
req.rawBody,
|
||||
);
|
||||
|
||||
if (event.type === WebhookEvent.SETUP_INTENT_SUCCEEDED) {
|
||||
await this.billingService.handleUnpaidInvoices(event.data);
|
||||
}
|
||||
|
||||
if (
|
||||
event.type === WebhookEvent.CUSTOMER_SUBSCRIPTION_CREATED ||
|
||||
event.type === WebhookEvent.CUSTOMER_SUBSCRIPTION_UPDATED
|
||||
event.type === WebhookEvent.CUSTOMER_SUBSCRIPTION_UPDATED ||
|
||||
event.type === WebhookEvent.CUSTOMER_SUBSCRIPTION_DELETED
|
||||
) {
|
||||
const workspaceId = event.data.object.metadata?.workspaceId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user