Sha256: dcf0f17bebd04e4d40e983fc654b27642b08316184efcf913660ad31ebdb92ec
Contents?: true
Size: 514 Bytes
Versions: 10
Compression:
Stored size: 514 Bytes
Contents
require 'stripe/event' module Stripe module EventDispatch def dispatch_stripe_event(params) retrieve_stripe_event(params) do |evt| target = evt.data.object ::Stripe::Callbacks.run_callbacks(evt, target) end end def retrieve_stripe_event(params) id = params['id'] if id == 'evt_00000000000000' #this is a webhook test yield Stripe::Event.construct_from(params.to_unsafe_h) else yield Stripe::Event.retrieve(id) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems