Class: Workarea::Storefront::Checkout::PlaceOrderController
- Inherits:
-
PaymentController
- Object
- ApplicationController
- ApplicationController
- Workarea::Storefront::CheckoutsController
- PaymentController
- Workarea::Storefront::Checkout::PlaceOrderController
- Defined in:
- app/controllers/workarea/storefront/checkout/place_order_controller.rb
Instance Method Summary collapse
-
#confirmation ⇒ Object
GET /checkout/confirmation.
-
#place_order ⇒ Object
PATCH /checkout/place_order.
Methods inherited from PaymentController
Methods inherited from Workarea::Storefront::CheckoutsController
Methods inherited from ApplicationController
#current_layout, #current_user_info, #health_check, #layout_content
Methods included from OrderLookup
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
#confirmation ⇒ Object
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_order ⇒ Object
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 |