#jrq_error

1 messages ¡ Page 1 of 1 (latest)

sudden cedarBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1219528737981464660

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

young flintBOT
inner kelp
#

Hi there, can you share with me the code that you wrote to handle webhook events?

golden garnet
inner kelp
#

Can you copy and paste one of the event IDs here?

golden garnet
#

evt_1Ovvr7F1Ggwtv9VQd1uQDlqf

#

I follow this flow ,but i can't pass this signature

#

this is my using secret.

inner kelp
#

What do you mean by "Can't pass this signature" ?

golden garnet
#

com.stripe.exception.SignatureVerificationException: No signatures found matching the expected signature for payload
at com.stripe.net.Webhook$Signature.verifyHeader(Webhook.java:145)
at com.stripe.net.Webhook.constructEvent(Webhook.java:74)
at com.stripe.net.Webhook.constructEvent(Webhook.java:51)
at com.stripe.net.Webhook.constructEvent(Webhook.java:32)

inner kelp
#

Did you pass the raw request body to constructEvent ? If you check the example code, it's using request.body()

golden garnet
#

How do I get a request?

inner kelp
#

Aren't you using SeveletUtils.getRequest() function to get the request?

golden garnet
#

but the request don't have body method

inner kelp
#

I'm not familiar with the Request class that you are using, you might want to consult its docs and see if they have an equivalent function to return the request body.

golden garnet
#

javax.servlet.http.HttpServletRequest

#

I use this request how to get payload?

#

I am using the Springmvc framework, and you are using the Spark framework,

#

I use the Spark framework to obtain the request, and it is not a problem

#

It is ok

inner kelp
#

Thanks for the waiting, discord is busy today.

#

Did you manage to solve the problem?