summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/dispatcher/failure_dispatcher.rb
blob: 54f8f2b700e8a5642b58079d1e8f9927c8b474fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module SolidusSubscriptions
  module Dispatcher
    class FailureDispatcher < Base
      def dispatch
        order.touch(:completed_at)
        order.cancel
        installment.failed!(order)
      end
    end
  end
end