Methods
Included Modules
Attributes
| [R] | event |
Class Public methods
events() Link
Source: show
# File app/lib/stripe/event_handlers/invoice_payment_failed.rb, line 9 def events ["invoice.payment_failed"] end
new(event) Link
Source: show
# File app/lib/stripe/event_handlers/invoice_payment_failed.rb, line 14 def initialize(event) @event = event end
Instance Public methods
call() Link
Source: show
# File app/lib/stripe/event_handlers/invoice_payment_failed.rb, line 18 def call if invoice_customer_member begin if invoice_subscription invoice_subscription.update_attribute(:pending_intent_id, invoice.payment_intent) else ::Api::PendingIntentUpdatorJob.set(wait: 1.minute).perform_later( payment_gateway_id: invoice.subscription, payment_intent_id: invoice.payment_intent ) end rescue Stripe::InvalidRequestError end unless gateway_payment_intent_requires_action? ::Api::DunningCommunicator.new(invoice).stop_churn! end ::Api::FailedPaymentRecorder.new(invoice, nil).log_failed_payment end end