Class: Stall::Checkout::PaymentCheckoutStep
- Defined in:
- lib/stall/checkout/payment_checkout_step.rb
Instance Attribute Summary
Attributes inherited from Step
Instance Method Summary collapse
-
#allow_inactive_carts? ⇒ Boolean
When we access this step after a payment to validate the step, the cart is “inactive”, so we force processing the cart.
- #process ⇒ Object
Methods inherited from Step
#cart_params, for, #identifier, #initialize, #inject, #is?, #prepare, #save, #skip?, #valid?, validations
Constructor Details
This class inherits a constructor from Stall::Checkout::Step
Instance Method Details
#allow_inactive_carts? ⇒ Boolean
When we access this step after a payment to validate the step, the cart is “inactive”, so we force processing the cart.
11 12 13 |
# File 'lib/stall/checkout/payment_checkout_step.rb', line 11 def allow_inactive_carts? !!params[:succeeded] end |
#process ⇒ Object
4 5 6 |
# File 'lib/stall/checkout/payment_checkout_step.rb', line 4 def process return true if params[:succeeded] end |