mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05: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
1 changed files with 8 additions and 3 deletions
|
@ -80,9 +80,14 @@ module.exports = class StripePaymentProcessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
async parseWebhook(body, signature) {
|
async parseWebhook(body, signature) {
|
||||||
const event = await this._stripe.webhooks.constructEvent(body, signature, this._webhookSecret);
|
try {
|
||||||
debug(`Parsed webhook event: ${event.type}`);
|
const event = await this._stripe.webhooks.constructEvent(body, signature, this._webhookSecret);
|
||||||
return event;
|
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) {
|
async createCheckoutSession(member, planName, options) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue