class Pay::Stripe::Webhooks::PaymentIntentSucceeded

Public Instance Methods

call(event) click to toggle source

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

# File lib/pay/stripe/webhooks/payment_intent_succeeded.rb, line 10
def call(event)
  object = event.data.object
  object.charges.data.each do |charge|
    Pay::Stripe::Charge.sync(charge.id, stripe_account: event.try(:account))
  end
end