#adelvalle

1 messages ยท Page 1 of 1 (latest)

tough waveBOT
sinful briar
#

Hi there!

#

What is your question?

severe chasm
#

I dont know why is not do my post method

#

sorry

#

and the post method does not work

#

no enter

#

and I dont know why

#

we_1LxSRnK8ASnZKS7JxNGFqguF

#

this is the webhook id

#

at first time, ithought ity was the connection but there is no a time oout

#

I changed the url

#

maybe, is it better to create a new one instead of change it?

sinful briar
#

So you need to check your server logs to understand what happened.

severe chasm
#

it is not entering the post method

#

because we hace a system.out.println in the doPost and dont print anything

#

it does not print anything

sinful briar
#

Do you see any error logs in your server?

severe chasm
#

no

#

I will create a new one webhook

sinful briar
#

I don't think creating a new webhook will change anything. If the webhook endpoint URL is correct, then there is probably an error in your code, so you should be able to see it in your error logs.

#

Note that this si what your server is sending to Stripe:

<?xml version="1.0" encoding="UTF-8"?>
<error><message></message><status-code>500</status-code></error>

severe chasm
#

no

#

there is no anything

sinful briar
#

Your server is returning an error message to Stripe, so you should be able to find more details about that error message on your end.

#

Then this error message will allow you to understand the issue and fix it.

severe chasm
#

Hi

#

are you?

#

I'm using Event evento = ApiResource.GSON.fromJson(jsonBody, Event.class); tod get the event

#

EventDataObjectDeserializer dataObjectDeserializer = evento.getDataObjectDeserializer();

#

evento.getDataObjectDeserializer().getObject() IS EMPTY

#

but evento.getObject() not

#

Hello???

leaden eagle
#

Hello, soma had to step out but I can help from here. Was just getting to this thread. Catching up for a minute and will get back to you

severe chasm
#

Ok, But I need someone please

#

I tell you

#

My webhook dont send good the event

#

I am using: Event evento = ApiResource.GSON.fromJson(jsonBody, Event.class);

#

and evento has:

leaden eagle
#

So the webhook signature verification is passing but calling dataObjectDeserializer returns empty?

severe chasm
#

yes

#

return empty

#

why is it possible?

leaden eagle
#

I am not immediately sure. What version of our java library are you using?

severe chasm
#

8

#

but it has worked before...

#

wait

#

sorry la 11

#

version is 11

#

11 and 8

#

In one server we are using version 8 and in other one,

#

11

leaden eagle
severe chasm
#

21.2.0

#

name: "stripe-java" , version :"21.2.0"

#

is it necessary to change it ?

leaden eagle
#

Ah, so I think that part of the issue is the API version vs the API version that your Stripe-java library uses.

severe chasm
#

ok, so I need to change the version of webhook?

leaden eagle
#

So to test this out, can you delete your existing endpoint and create one that is pinned to the 2022-08-01 version?

#

You can change either but doing this would be faster to see now

severe chasm
#

endpint is webhook no?

#

okok

leaden eagle
#

Long term, it is up to you what API version you want to use for each. You can stay at this 2020 version or upgrade both to use the latest 2022 one. As long as they match you should be able to get the objects properly though

severe chasm
#

2020-08-27

#

I created with 2020-08-27 and We are using name: "stripe-java" , version :"21.2.0"

#

is it ok?

leaden eagle
#

Whoops I sent the wrong link before. You will actually want to set it up for 2022-08-01 for any 21.x.x versions of stripe-java

#

Oh wait I did send the right URL. But yes either way, set 2022-08-01 for this version

severe chasm
#

01-08-2022 is ok, but I selected 2020

#

so it is wrong

leaden eagle
#

Correct, use 2022-08-01 specifically

#

I think the mismatch is causing the empty objects

severe chasm
#

sorry but only appears

#

so I can select 2022 ?

leaden eagle
#

Oh right, I forgot that you can only do account's default or latest version.

#

So you will need to swap out your stripe-java library

#

To either 22.0.0

severe chasm
#

ok

#

ok

leaden eagle
#

Or 20.136.0

severe chasm
#

Ok, I will try

severe chasm
#

Hello

#

The green one has worked correctly

#

this is one server

#

but in the other server, have not worked

#

and it has not entered the post method

leaden eagle
#

As in things are being sent to your server, but your code that handles the post method is not being triggered?

severe chasm
#

is not being triggered?

#

mybe is not deployed?

leaden eagle
severe chasm
#

yes

leaden eagle
#

Then it sounds like you may have a firewall or something else that is preventing the event from getting to your server

#

We have this list of IPs to make sure are allowed for webhook events

severe chasm
#

Post method has the code where we get the dataObjectDeserializer

#

Yes, I think that

livid patrol
#

Hello ๐Ÿ‘‹
Taking over as Pompey needs to step away soon, let me know if you have any follow up questions ๐Ÿ™‚

severe chasm
#

No Thanks!

livid patrol
#

๐Ÿ‘