#lithira_sa
1 messages · Page 1 of 1 (latest)
how to fix that issue .please tell me.
Sounds like you're providing the request body incorrectly. The error messages tells you what's wrong. Recommend following our sample integration here: https://stripe.com/docs/webhooks/quickstart?lang=node
app.post('/terminal-payment-success', bodyParser.raw({type:'application/json'}),(request, response) => {
const payload = request.body;
const sig = request.headers['stripe-signature'];
console.log('Body ',request.body)
let event;
try {
event = stripe.webhooks.constructEvent(payload, sig, signingSecret);
} catch (err) {
response.status(400).send(`Webhook Error: ${err.message}`);
return;
}
I tried the Node.js code that is given in Stripe .But it doesn't work.
Please solve my issue. I'm searching a solution for several hours. but nothing works
I tried it . But is doesn't work. Then I altered that code
2023-09-08 20:16:09 --> charge.succeeded [evt_3No5whLJfluVTg0a1h3QGR4x]
2023-09-08 20:16:09 --> payment_intent.succeeded [evt_3No5whLJfluVTg0a1o7fXVWk]
2023-09-08 20:16:10 --> payment_intent.created [evt_3No5whLJfluVTg0a1vCbxuZX]
2023-09-08 20:16:12 <-- [400] POST http://127.0.0.1:5001/franchise-burger-390516/us-central1/webhooks/terminal-payment-success [evt_3No5whLJfluVTg0a1h3QGR4x]
2023-09-08 20:16:12 <-- [400] POST http://127.0.0.1:5001/franchise-burger-390516/us-central1/webhooks/terminal-payment-success [evt_3No5whLJfluVTg0a1o7fXVWk]
2023-09-08 20:16:12 <-- [400] POST http://127.0.0.1:5001/franchise-burger-390516/us-central1/webhooks/terminal-payment-success [evt_3No5whLJfluVTg0a1vCbxuZX]
2023-09-08 20:16:09 --> charge.succeeded [evt_3No5whLJfluVTg0a1h3QGR4x]
2023-09-08 20:16:09 --> payment_intent.succeeded [evt_3No5whLJfluVTg0a1o7fXVWk]
2023-09-08 20:16:10 --> payment_intent.created [evt_3No5whLJfluVTg0a1vCbxuZX]
2023-09-08 20:16:12 <-- [400] POST http://127.0.0.1:5001/franchise-burger-390516/us-central1/webhooks/terminal-payment-success [evt_3No5whLJfluVTg0a1h3QGR4x]
2023-09-08 20:16:12 <-- [400] POST http://127.0.0.1:5001/franchise-burger-390516/us-central1/webhooks/terminal-payment-success [evt_3No5whLJfluVTg0a1o7fXVWk]
2023-09-08 20:16:12 <-- [400] POST http://127.0.0.1:5001/franchise-burger-390516/us-central1/webhooks/terminal-payment-success [evt_3No5whLJfluVTg0a1vCbxuZX]
But is doesn't work
You're going to need to be more specific
What about it didn't work
Now I used the code in Stripe platform but this is the result of it
What about the sample integration didn't work?
What?
You need to be more specific
How did that event processing not work with the sample code from https://stripe.com/docs/webhooks/quickstart?lang=node