Module: Spree::PaymentProcessingDecorator
- Defined in:
- app/models/spree/payment_processing_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
3 4 5 |
# File 'app/models/spree/payment_processing_decorator.rb', line 3 def self.prepended(base) base.delegate :settle, to: :provider end |
Instance Method Details
#gateway_action(source, action, success_state) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/models/spree/payment_processing_decorator.rb', line 11 def gateway_action(source, action, success_state) protect_from_connection_error do response = payment_method.send(action, money.money.cents, source, ) success_state = set_proper_state(success_state, response, action) handle_response(response, success_state, :failure) end end |
#settle! ⇒ Object
7 8 9 |
# File 'app/models/spree/payment_processing_decorator.rb', line 7 def settle! handle_payment_preconditions { process_settle } end |