Skip to content

Commit

Permalink
Remove legacy example from README that predated signed Stripe events
Browse files Browse the repository at this point in the history
  • Loading branch information
rmm5t committed Sep 4, 2019
1 parent 2740f0c commit 4e15c7f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ StripeEvent.signing_secrets = [

If you have built an application that has multiple Stripe accounts--say, each of your customers has their own--you may want to define your own way of retrieving events from Stripe (e.g. perhaps you want to use the [account parameter](https://stripe.com/docs/connect/webhooks) from the top level to detect the customer for the event, then grab their specific API key). You can do this:

```ruby
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
```

```ruby
class EventFilter
def call(event)
Expand Down

0 comments on commit 4e15c7f

Please sign in to comment.