Sha256: 46a9aa34267abb49722b37ed3d0fa806a37bb199aa9c239bf101415438222512

Contents?: true

Size: 772 Bytes

Versions: 2

Compression:

Stored size: 772 Bytes

Contents

module Spree
  module SolidusSixSaferpay

    # This handler can be overridden by host applications to manage control
    # flow after the payment authorization was successful and the payment was verified.
    # If not overridden, the handler will simply ensure that the order has
    # moved from the "payment" state to the next state.
    class PaymentProcessingSuccessHandler

      attr_reader :controller_context, :order

      def self.call(controller_context:, order:)
        new(controller_context: controller_context, order: order).call
      end

      def initialize(controller_context:, order:)
        @controller_context = controller_context
        @order = order
      end

      def call
        order.next! if order.payment?
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_six_saferpay-0.5.0 app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb
solidus_six_saferpay-0.4.0 app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb