We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ff5466 commit 5ca41bfCopy full SHA for 5ca41bf
src/actions/stripeWebhook.js
@@ -25,10 +25,10 @@ const StripeWebhookParams = new Archetype({
25
}
26
}).compile('StripeWebhookParams');
27
28
-module.exports = async function stripeWebhook(params, req) {
29
- console.log('AB', req, process.env.STRIPE_WEBHOOK_SECRET);
+module.exports = async function stripeWebhook(params, event) {
+ console.log('AB', event.body, process.env.STRIPE_WEBHOOK_SECRET);
30
try {
31
- stripe.client.webhooks.constructEvent(req.rawBody, req.headers['stripe-signature'], process.env.STRIPE_WEBHOOK_SECRET);
+ stripe.client.webhooks.constructEvent(event.body, event.headers['stripe-signature'], process.env.STRIPE_WEBHOOK_SECRET);
32
} catch (err) {
33
console.log('Caught', err);
34
throw new Error('Invalid webhook signature');
0 commit comments