mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Removed environment checks from webhook service
refs https://github.com/TryGhost/Team/issues/598 refs https://github.com/TryGhost/Ghost/commit/5cdf910e Since we have included these checks in the Ghost codebase we do not need to run them here.
This commit is contained in:
parent
0d3014a87a
commit
26e2cb98e9
@ -167,8 +167,7 @@ module.exports = function MembersApi({
|
||||
stripeWebhookService.configure({
|
||||
webhookSecret: process.env.WEBHOOK_SECRET,
|
||||
webhookHandlerUrl: stripeConfig.webhookHandlerUrl,
|
||||
webhook: stripeConfig.webhook || {},
|
||||
mode: process.env.NODE_ENV || 'development'
|
||||
webhook: stripeConfig.webhook || {}
|
||||
})
|
||||
]) : Promise.resolve();
|
||||
|
||||
|
@ -44,12 +44,6 @@ module.exports = class StripeWebhookService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.mode !== 'production') {
|
||||
const error = new Error('Cannot use remote webhooks in development mode. Please use the WEBHOOK_SECRET environment variable.');
|
||||
error.fatal = true;
|
||||
throw error;
|
||||
}
|
||||
|
||||
/** @type {import('stripe').Stripe.WebhookEndpointCreateParams.EnabledEvent[]} */
|
||||
const events = [
|
||||
'checkout.session.completed',
|
||||
|
Loading…
Reference in New Issue
Block a user