Sha256: c49d1b57091eb7c943184399f8066fe1a5075ed7d532425f86005887cc6a32b7
Contents?: true
Size: 643 Bytes
Versions: 38
Compression:
Stored size: 643 Bytes
Contents
module Pay module Stripe module Webhooks class PaymentIntentSucceeded # This webhook does NOT send notifications because stripe sends both # `charge.succeeded` and `payment_intent.succeeded` events. # # We use `charge.succeeded` as the single place to send notifications def call(event) object = event.data.object payment_intent = ::Stripe::PaymentIntent.retrieve({id: object.id}, {stripe_account: event.try(:account)}.compact) Pay::Stripe::Charge.sync(payment_intent.latest_charge, stripe_account: event.try(:account)) end end end end end
Version data entries
38 entries across 38 versions & 1 rubygems