Class: Spree::SolidusSixSaferpay::PaymentProcessingSuccessHandler
- Inherits:
-
Object
- Object
- Spree::SolidusSixSaferpay::PaymentProcessingSuccessHandler
- Defined in:
- app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb
Overview
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.
Instance Attribute Summary collapse
-
#controller_context ⇒ Object
readonly
Returns the value of attribute controller_context.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(controller_context:, order:) ⇒ PaymentProcessingSuccessHandler
constructor
A new instance of PaymentProcessingSuccessHandler.
Constructor Details
#initialize(controller_context:, order:) ⇒ PaymentProcessingSuccessHandler
Returns a new instance of PaymentProcessingSuccessHandler.
16 17 18 19 |
# File 'app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb', line 16 def initialize(controller_context:, order:) @controller_context = controller_context @order = order end |
Instance Attribute Details
#controller_context ⇒ Object (readonly)
Returns the value of attribute controller_context.
10 11 12 |
# File 'app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb', line 10 def controller_context @controller_context end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
10 11 12 |
# File 'app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb', line 10 def order @order end |
Class Method Details
.call(controller_context:, order:) ⇒ Object
12 13 14 |
# File 'app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb', line 12 def self.call(controller_context:, order:) new(controller_context: controller_context, order: order).call end |
Instance Method Details
#call ⇒ Object
21 22 23 |
# File 'app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb', line 21 def call order.next! if order.payment? end |