Class: Workarea::Storefront::Checkout::PlaceOrderController

Inherits:
PaymentController show all
Defined in:
app/controllers/workarea/storefront/checkout/place_order_controller.rb

Instance Method Summary collapse

Methods inherited from PaymentController

#payment

Methods inherited from Workarea::Storefront::CheckoutsController

#new

Methods inherited from ApplicationController

#current_layout, #current_user_info, #health_check, #layout_content

Methods included from OrderLookup

#lookup_order, #lookup_order=

Methods included from Workarea::Storefront::CurrentCheckout

#clear_current_order, #completed_order, #completed_order=, #current_checkout, #current_order, #current_order=, #current_shipping, #current_shippings, #logout

Instance Method Details

#confirmationObject

GET /checkout/confirmation



17
18
19
20
21
22
# File 'app/controllers/workarea/storefront/checkout/place_order_controller.rb', line 17

def confirmation
  redirect_to cart_path and return unless completed_order.present?

  @content = Storefront::Checkout::ConfirmationViewModel.new
  @order = Storefront::OrderViewModel.new(completed_order)
end

#place_orderObject

PATCH /checkout/place_order



6
7
8
9
10
11
12
13
14
# File 'app/controllers/workarea/storefront/checkout/place_order_controller.rb', line 6

def place_order
  payment_step.update(params)

  if payment_step.complete?
    try_place_order
  else
    incomplete_place_order
  end
end