#mulo_node-webhook-silentfail
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mulo_payment-methods, 5 hours ago, 18 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1253764906591715358
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi ๐
What is your actual question here?
(request, response) {
const data = request.body;
const invoice = data.data.object;
const customMetadata = invoice.lines.data[0].metadata.custom;
console.log(customMetadata, '<<<<<<<< stripe') //THIS IS GETTING LOGGED
const sig = request.headers['stripe-signature'];
let event;
try {
event = stripe.webhooks.constructEvent(request.body, sig, 'weboohkey');
} catch (err) {
console.log(err)//NO err
}
console.log('STRIPE PAYMENT') // This is NOT logged
console.log('STRIPE PAYMENT') // This is NOT logged
Still not a question
is like as if the execution stops at the try catch without errors
is the
event = stripe.webhooks.constructEvent(request.body, sig, 'weboohkey');
``` look correct?
i did:
console.log(err)//NO err
logs no errors tho
Unless you are substituting the 'wehoohkey' with an actual webhook key
And No, that log is not INSIDE the try block
the only line inside the try block is the event = stripe.webhooks.constructEvent(request.body, sig, 'weboohkey');
Between the curly braces {}
try {
event = stripe.webhooks.constructEvent(request.body, sig, 'we_1PSG3D.....m26JA5aB');
} catch (err) {
console.log(err)
response.status(400).send(`Webhook Error: ${err.message}`);
return;
}
Still nope
that is what I have, there were chars limitation on the embed
try {
// Put some logging here
event = stripe.webhooks.constructEvent(request.body, sig, 'we_1PSG3D.....m26JA5aB');
} catch (err) {
console.log(err)
response.status(400).send(`Webhook Error: ${err.message}`);
return;
}
Also I want to make sure you are aware of known issues with Node and Express and our webhooks. It's explained pretty well here: https://github.com/stripe/stripe-node/issues/331
But you haven't reached the point where your signature verification is failing yet.