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

Dosent work for multiple stripe accounts #105

Closed skimonkey closed 6 years ago

skimonkey commented 7 years ago

You can open multiple stripe accounts under the one login profile, each account gets its own set of api keys. The webhooks willl only working against the initial account. If you switch to another account, and set the correct secret key in the web.config it does not work. It always rejects the event as invalid even though it is a valid event

{ "Message": "The ID 'evt_19hnL4LdhGUIe7s6LxbGyl83' could not be resolved for an actual event." }

HenrikFrystykNielsen commented 7 years ago

Can you try and use the 'direct' mode of the Stripe receiver: it doesn't do a follow up GET request to get the actual event data. For details, please see fdc6a7fa059eed2a6ceca39aece06898c18a0f84

Hope this helps!

Henrik

jsvahn commented 7 years ago

Did you get any explanation to this issue? We are having the same error, though we only have one account. The same key and event combination works if I run it with curl, so it seems to me that the key implementation here simply is broken for Stripe?

dougbu commented 7 years ago

Is this a dupe of #63?

dougbu commented 7 years ago

Never mind, #63 is unrelated.

dougbu commented 7 years ago

Storing per-account keys in application settings is too static for Connect platform implementations. (Account WebHooks won't hit #63.) It's particularly telling that StripeWebHookReceiver does not reference a Connect event's account property.

Probably need to wrap the GetReceiverConfig(...) call in a lower-level extensibility point than the current (virtual) StripeWebHookReceiver.GetEventDataAsync(...) method. Then, a complete Connect WebHook application could easily hook up an account database that get's updated as accounts are registered and removed.

dougbu commented 6 years ago

163 should fix this issue. Closing as a duplicate.