Sha256: 0c1bfdd29c83cfdf21c36d6e2fb26fff7e02fd1b0a545e0a421b36164bc5e4e6

Contents?: true

Size: 428 Bytes

Versions: 2

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

module SolidusSubscriptions
  module Dispatcher
    class PaymentFailedDispatcher < Base
      def dispatch
        order.touch(:completed_at)
        order.cancel
        installment.payment_failed!(order)

        ::Spree::Event.fire(
          'solidus_subscriptions.installment_failed_payment',
          installment: installment,
          order: order,
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_subscriptions-1.0.0 lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher.rb
solidus_subscriptions-1.0.0.rc1 lib/solidus_subscriptions/dispatcher/payment_failed_dispatcher.rb