app/controllers/spree/api/checkouts_controller.rb in solidus_api-2.1.0.beta1 vs app/controllers/spree/api/checkouts_controller.rb in solidus_api-2.1.0.rc1

- old
+ new

@@ -6,23 +6,18 @@ before_action :update_order_state, only: [:next, :advance, :update, :complete] rescue_from Spree::Order::InsufficientStock, with: :insufficient_stock_error include Spree::Core::ControllerHelpers::Order + # TODO: Remove this after deprecated usage in #update is removed include Spree::Core::ControllerHelpers::PaymentParameters # This before_action comes from Spree::Core::ControllerHelpers::Order skip_before_action :set_current_order def next - if @order.confirm? - Spree::Deprecation.warn "Using Spree::Api::CheckoutsController#next to transition to complete is deprecated. Please use #complete instead of #next.", caller - complete - return - end - authorize! :update, @order, order_token if !expected_total_ok?(params[:expected_total]) respond_with(@order, default_template: 'spree/api/orders/expected_total_mismatch', status: 400) return end @@ -90,19 +85,9 @@ end end def massaged_params massaged_params = params.deep_dup - - if params[:payment_source].present? - Spree::Deprecation.warn("Passing payment_source is deprecated. Send source parameters inside payments_attributes[:source_attributes].", caller) - move_payment_source_into_payments_attributes(massaged_params) - end - - if params[:order] && params[:order][:existing_card].present? - Spree::Deprecation.warn("Passing order[:existing_card] is deprecated. Send existing_card_id inside of payments_attributes[:source_attributes].", caller) - move_existing_card_into_payments_attributes(massaged_params) - end set_payment_parameters_amount(massaged_params, @order) massaged_params end