class Pay::Stripe::Webhooks::ChargeRefunded
Public Instance Methods
call(event)
click to toggle source
# File lib/pay/stripe/webhooks/charge_refunded.rb, line 5 def call(event) pay_charge = Pay::Stripe::Charge.sync(event.data.object.id, stripe_account: event.try(:account)) notify_user(pay_charge.customer.owner, pay_charge) if pay_charge end
notify_user(billable, charge)
click to toggle source
# File lib/pay/stripe/webhooks/charge_refunded.rb, line 10 def notify_user(billable, charge) if Pay.send_emails Pay::UserMailer.with(billable: billable, charge: charge).refund.deliver_later end end