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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const webhookHandlerUrl = new URL('/members/webhooks/stripe', siteUrl);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
publicKey: stripePaymentProcessor.config.public_token,
|
publicKey: stripePaymentProcessor.config.public_token,
|
||||||
secretKey: stripePaymentProcessor.config.secret_token,
|
secretKey: stripePaymentProcessor.config.secret_token,
|
||||||
checkoutSuccessUrl: siteUrl,
|
checkoutSuccessUrl: siteUrl,
|
||||||
checkoutCancelUrl: siteUrl,
|
checkoutCancelUrl: siteUrl,
|
||||||
|
webhookHandlerUrl: webhookHandlerUrl.href,
|
||||||
product: stripePaymentProcessor.config.product,
|
product: stripePaymentProcessor.config.product,
|
||||||
plans: stripePaymentProcessor.config.plans,
|
plans: stripePaymentProcessor.config.plans,
|
||||||
appInfo: {
|
appInfo: {
|
||||||
|
|
|
@ -155,6 +155,7 @@ module.exports = function setupSiteApp(options = {}) {
|
||||||
res.end(err.message);
|
res.end(err.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
siteApp.post('/members/webhooks/stripe', membersService.api.middleware.handleStripeWebhook);
|
||||||
siteApp.use(async function (req, res, next) {
|
siteApp.use(async function (req, res, next) {
|
||||||
if (!labsService.isSet('members')) {
|
if (!labsService.isSet('members')) {
|
||||||
req.member = null;
|
req.member = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue