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

Validation requests should log a message indicating that they were processed #31

Closed HenrikFrystykNielsen closed 8 years ago

HenrikFrystykNielsen commented 8 years ago

For example, Stripe receiver should log that it received a test event ID request.

codeputer commented 8 years ago

Thanks again for your help on this - the filter on event id evt_000000000000 I believe I understand. However, via the Stripe testing interface, this is only event that is published in a testing role. If I want to test my processing logic for Charged Successful event, the event ID that is produced is still evt_0000000. As I'm new to the Stripe API, perhaps it's my understanding, but with this filter the only way to test any event via the Stripe testing interface is actual Live events. That doesn't seem to be the best use of their testing tool, and dramatically reduces the usefulness of the Slack webhook. Would it not be better to have a parameter to manage this filter by a config option, or perhaps by the fact the project is in DEBUG mode?

codeputer commented 8 years ago

Response from Stripe about evt id:

Thanks for reaching out to us. I'd be happy to help! So to touch on your questions in order:

  1. That is the "Event ID"-field. Basically, that will be unique to every event you receive on the webhook endpoint url. It's just a unique identifier that you can use to make reference to that event later.
  2. It will change with every webhook you receive.
  3. It will always start with "evt_" and be followed by a small string of alphanumeric characters. When you issue a test webhook, however, it will always be "evt_00000000000000".

You can actually learn more about webhooks in our documentation here: [1] https://stripe.com/docs/webhooks

A list of all the possible webhook types you can receive is available here: [2] https://stripe.com/docs/api#event_types

One thing I may recommend is that you actually setup some events, customers, charges, and whatnot using your test keys. That way when you see webhooks triggered, you'll have real(-ish) data as opposed to "evt_00000000000000".

I hope that helps clear up some of your confusion. Don't worry about being new! We're here to help and we all have to start somewhere. Thanks so much for your great question.

Kind Regards, Korben

HenrikFrystykNielsen commented 8 years ago

Added messages -- see commit 43d7515608d0aff62431c6bf35febd9127a82774.