mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Wired up the members webhook handler endpoint
no-issue
This commit is contained in:
parent
ab18905c76
commit
d4249a07c0
2 changed files with 4 additions and 0 deletions
|
@ -74,11 +74,14 @@ function getStripePaymentConfig() {
|
|||
return null;
|
||||
}
|
||||
|
||||
const webhookHandlerUrl = new URL('/members/webhooks/stripe', siteUrl);
|
||||
|
||||
return {
|
||||
publicKey: stripePaymentProcessor.config.public_token,
|
||||
secretKey: stripePaymentProcessor.config.secret_token,
|
||||
checkoutSuccessUrl: siteUrl,
|
||||
checkoutCancelUrl: siteUrl,
|
||||
webhookHandlerUrl: webhookHandlerUrl.href,
|
||||
product: stripePaymentProcessor.config.product,
|
||||
plans: stripePaymentProcessor.config.plans,
|
||||
appInfo: {
|
||||
|
|
|
@ -155,6 +155,7 @@ module.exports = function setupSiteApp(options = {}) {
|
|||
res.end(err.message);
|
||||
}
|
||||
});
|
||||
siteApp.post('/members/webhooks/stripe', membersService.api.middleware.handleStripeWebhook);
|
||||
siteApp.use(async function (req, res, next) {
|
||||
if (!labsService.isSet('members')) {
|
||||
req.member = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue