Class: Pay::Stripe::Webhooks::PaymentIntentSucceeded
- Inherits:
-
Object
- Object
- Pay::Stripe::Webhooks::PaymentIntentSucceeded
- Defined in:
- lib/pay/stripe/webhooks/payment_intent_succeeded.rb
Instance Method Summary collapse
-
#call(event) ⇒ Object
This webhook does NOT send notifications because stripe sends both `charge.succeeded` and `payment_intent.succeeded` events.
Instance Method Details
#call(event) ⇒ Object
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
10 11 12 13 14 15 |
# 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 |