Class: Stall::Checkout::PaymentReturnCheckoutStep

Inherits:
Step
  • Object
show all
Includes:
ArchivedPaidCartHelper, Stall::CartHelper
Defined in:
lib/stall/checkout/payment_return_checkout_step.rb

Instance Attribute Summary

Attributes inherited from Step

#cart

Instance Method Summary collapse

Methods included from ArchivedPaidCartHelper

#archivable_cart?, #archive_paid_cart_cookie, #archived_paid_cart, #archived_paid_cart?

Methods included from Stall::CartHelper

#current_cart, #current_customer

Methods inherited from Step

#identifier, #initialize, #inject, #is?, #process, #save, #skip?, #valid?

Constructor Details

This class inherits a constructor from Stall::Checkout::Step

Instance Method Details

#allow_inactive_carts?Boolean

When we access this step, the cart is “inactive”, since it is paid, so we force processing the cart.

Returns:

  • (Boolean)


16
17
18
# File 'lib/stall/checkout/payment_return_checkout_step.rb', line 16

def allow_inactive_carts?
  true
end

#prepareObject



7
8
9
10
11
# File 'lib/stall/checkout/payment_return_checkout_step.rb', line 7

def prepare
  if archivable_cart?(cart)
    archive_paid_cart_cookie(cart.identifier)
  end
end