Removed invoice.payment_failed webhook handling

refs https://github.com/TryGhost/Team/issues/885

This webhook isn't used and can cause issues when Checkout Sessions are
completed but with a failed payment. Removing it will remove those
errors.
This commit is contained in:
Fabien O'Carroll 2021-10-25 14:31:44 +02:00
parent 41b23dceb7
commit 68163863c2

View File

@ -32,7 +32,6 @@ module.exports = class StripeWebhookService {
this.registerHandler('customer.subscription.updated', this.subscriptionEvent);
this.registerHandler('customer.subscription.created', this.subscriptionEvent);
this.registerHandler('invoice.payment_succeeded', this.invoiceEvent);
this.registerHandler('invoice.payment_failed', this.invoiceEvent);
this.registerHandler('checkout.session.completed', this.checkoutSessionEvent);
}
@ -52,8 +51,7 @@ module.exports = class StripeWebhookService {
'customer.subscription.deleted',
'customer.subscription.updated',
'customer.subscription.created',
'invoice.payment_succeeded',
'invoice.payment_failed'
'invoice.payment_succeeded'
];
const setupWebhook = async (id, secret, opts = {}) => {