I'm trying to set up a Stripe webhook in Sails, checking the webhook signature as described here. The signature is being returned in the same format as the Stripe example, but every test webhook returns:
No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing
To try and get the raw request body I've attempted to bypass the bodyParser middleware for this route in sails.config.http, as described here, but if I do that then this.req.body is:
undefined
As an aside, I can see there is some integration with Stripe in Sails, but I can't find a pre-built webhook. If i'm re-inventing the wheel, please let me know, there is very little documentation on integrating Stripe with Sails.