Class: Spree::VpagoPaymentSource

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree/vpago_payment_source.rb

Instance Method Summary collapse

Instance Method Details

#actionsObject

validates :updated_reason, presence: true, on: :update



14
15
16
17
18
19
20
# File 'app/models/spree/vpago_payment_source.rb', line 14

def actions
  actions = []
  actions << 'open_checkout' if payment.checkout?
  actions << 'process' if payment.processing? || payment.checkout? || payment.send(:has_invalid_state?)
  actions << 'capture' if payment.pending?
  actions
end