mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -05:00
Added priority to webhook secret if present in env (#103)
no issue - When debugging Stripe with using: `stripe listen \ --forward-to http://ghost.local/members/webhooks/stripe/` this priority is nice to have so that Ghost process can be initialized using WEBHOOK_SECRET env variable - It was not working in current form because Stripe recognized `ghost.local` as a valid domain and didn't throw any errors - Removed unneeded secret assignment in a catch statement. It is redundant with the new implementation
This commit is contained in:
parent
9da1a18770
commit
0149dd8f4d
1 changed files with 1 additions and 2 deletions
|
@ -62,10 +62,9 @@ module.exports = class StripePaymentProcessor {
|
|||
'invoice.payment_failed'
|
||||
]
|
||||
});
|
||||
this._webhookSecret = webhook.secret;
|
||||
this._webhookSecret = process.env.WEBHOOK_SECRET || webhook.secret;
|
||||
} catch (err) {
|
||||
this.logging.warn(err);
|
||||
this._webhookSecret = process.env.WEBHOOK_SECRET;
|
||||
}
|
||||
debug(`Webhook secret set to ${this._webhookSecret}`);
|
||||
} catch (err) {
|
||||
|
|
Loading…
Add table
Reference in a new issue