aspnet / WebHooks

[Archived] Libraries to create and consume web hooks on ASP.NET Core. Project moved to https://github.com/aspnet/AspLabs
Apache License 2.0
627 stars 439 forks source link

Fails to fetch the event from Stripe #128

Closed bjomi closed 6 years ago

bjomi commented 7 years ago

Hi,

we're using the Stripe receiver and we get an error when trying to fetch the actual event from Stripe (indirect mode). The error we get from Stripe is this:

The ID 'evt_' could not be resolved for an actual event

So, something goes wrong when making the get request to Stripe in the GetEventDataAsync method. The MS_WebHookReceiverSecret_Stripe key is set to our secret test key from Stripe (in the form sktest).

When we make a simple request from cURL we do get the event back.

So, either something is wrong in the WebHooks code for Stripe or we do something wrong that is not obvious for us. Very grateful for advice here.

Best regards, Björn Milton

bjomi commented 7 years ago

@HenrikFrystykNielsen do you have any idea about what might cause this?

HenrikFrystykNielsen commented 7 years ago

Can you try and use the 'direct data' version of Stripe which doesn't get the data but just uses the data present in the event directly?

bjomi commented 7 years ago

Thanks for your reply Henrik!

Yeah, we could use the "direct data" version. But we would like to follow best practices for Stripe, and they say that you should fetch the event again (as you probably know). When reading the code I can't see anything obvious that goes wrong when fetching the event from Stripe. Still something happens that we can't pin down. Have you seen or heard that this piece of code have worked before? Have you ran it yourself? Just trying to figure out if we do something wrong (which I have a hard time to identify) or if there indeed is some issue with the code.

HenrikFrystykNielsen commented 7 years ago

Hmm, I don't have a strong idea here. I do know they say that for best practice but it might be useful to at least try the other way to see if that works. If you use an appropriate code in the URI then it should be ok.

bjomi commented 7 years ago

Yeah, we're going the direct route for now. That works, and running if over an SSL endpoint in combination with the secret code.

But it would be interesting to understand why the other approach does not work.

In any case, thanks for your input.

monireddy18 commented 7 years ago

Hi, @bjomi I found a similar issue in our Stripe integration code as well. Do you have any update on this issue yet?

Best Regards, Monika

dougbu commented 7 years ago

This sounds similar to #105. @bjomi and @monireddy18 are you using Connect WebHooks? Account WebHooks shouldn't hit this issue if it's a dupe of #105.

bjomi commented 7 years ago

@monireddy18 no, nothing new regarding this. We haven't looked deeper into it.

@dougbu yeah, we identified it as a possibly related issue at the time too. But I don't now. We are not using multiple accounts so it might also be totally unrelated.

dougbu commented 6 years ago

163 should fix this issue. Closing as a duplicate.