mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-13 10:55:58 +03:00
Added logging for failed webhook verification
no-issue This gives us some more information about the secret used
This commit is contained in:
parent
f233d5fc71
commit
7a3c99886d
@ -80,9 +80,14 @@ module.exports = class StripePaymentProcessor {
|
||||
}
|
||||
|
||||
async parseWebhook(body, signature) {
|
||||
const event = await this._stripe.webhooks.constructEvent(body, signature, this._webhookSecret);
|
||||
debug(`Parsed webhook event: ${event.type}`);
|
||||
return event;
|
||||
try {
|
||||
const event = await this._stripe.webhooks.constructEvent(body, signature, this._webhookSecret);
|
||||
debug(`Parsed webhook event: ${event.type}`);
|
||||
return event;
|
||||
} catch (err) {
|
||||
this.logging.error(`Error verifying webhook signature, using secret ${this._webhookSecret}`);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
async createCheckoutSession(member, planName, options) {
|
||||
|
Loading…
Reference in New Issue
Block a user