mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Fixed webhook handler check for if Stripe configured
no-issue Previously we would not create an instance of the StripeAPIService if Stripe was not configured, but that is not the case any more, instead we have a configured flag on the service. The webhook route handler was not updated to use this flag and so would attempt to handle webhooks without having any of the required data. This would result in an uncaught error.
This commit is contained in:
parent
a072d19385
commit
00e0c9d205
@ -350,7 +350,7 @@ module.exports = function MembersAPI({
|
||||
};
|
||||
|
||||
middleware.handleStripeWebhook.use(body.raw({type: 'application/json'}), async function (req, res) {
|
||||
if (!stripeAPIService) {
|
||||
if (!stripeAPIService.configured) {
|
||||
common.logging.error(`Stripe not configured, not handling webhook`);
|
||||
res.writeHead(400);
|
||||
return res.end();
|
||||
|
Loading…
Reference in New Issue
Block a user