Class: FlowcommerceSpree::OrdersController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- FlowcommerceSpree::OrdersController
- Defined in:
- app/controllers/flowcommerce_spree/orders_controller.rb
Instance Method Summary collapse
-
#order_completed ⇒ Object
proxy enpoint between flow and thankyou page.
Instance Method Details
#order_completed ⇒ Object
proxy enpoint between flow and thankyou page. /flow/order_completed endpoint
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/flowcommerce_spree/orders_controller.rb', line 13 def order_completed order = Spree::Order.find_by number: params[:order], guest_token: params[:t] flow_updater = FlowcommerceSpree::OrderUpdater.new(order: order) flow_updater.complete_checkout redirection_path = "/thankyou?order=#{params[:order]}&t=#{params[:t]}" locale = order.locale_path redirection_path = "/#{locale}#{redirection_path}" if locale redirect_to redirection_path end |