integrallis / stripe_event

Stripe webhook integration for Rails applications.
https://rubygems.org/gems/stripe_event
MIT License
844 stars 104 forks source link

Remove the example with Stripe::Event.retrieve from README #127

Closed bblimke closed 5 years ago

bblimke commented 5 years ago

I find the following example in REAMDE https://github.com/integrallis/stripe_event#configuration confusing.

StripeEvent.event_filter = lambda do |event|
  api_key = Account.find_by!(stripe_account_id: event.account).api_key
  Stripe::Event.retrieve(event.id, api_key)
end

There is no need to retrieve the event anymore since version 2.0.0, as events are signed, yet the document suggests it's required.

rmm5t commented 5 years ago

Thanks for pointing that out. Readme updated.

bblimke commented 5 years ago

Excellent. Thank you!