Class: SolidusAfterpay::CallbacksController
- Inherits:
-
BaseController
- Object
- Spree::BaseController
- BaseController
- SolidusAfterpay::CallbacksController
- Defined in:
- app/controllers/solidus_afterpay/callbacks_controller.rb
Instance Method Summary collapse
Instance Method Details
#cancel ⇒ Object
21 22 23 |
# File 'app/controllers/solidus_afterpay/callbacks_controller.rb', line 21 def cancel redirect_to checkout_state_path(order.state) end |
#confirm ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/solidus_afterpay/callbacks_controller.rb', line 8 def confirm :update, order, order_token if ::Spree::OrderUpdateAttributes.new(order, update_params, request_env: request.headers.env).apply order.next end respond_to do |format| format.html { redirect_to checkout_state_path(order.state) } format.json { render json: { redirect_url: checkout_state_url(order.state) } } end end |