app/controllers/spree/api/payments_controller.rb in solidus_api-2.5.2 vs app/controllers/spree/api/payments_controller.rb in solidus_api-2.6.0.rc1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Spree module Api class PaymentsController < Spree::Api::BaseController before_action :find_order around_action :lock_order, only: [:create, :update, :destroy, :authorize, :capture, :purchase, :void, :credit] @@ -25,10 +27,10 @@ end end def update authorize! params[:action], @payment - if ! @payment.pending? + if !@payment.pending? render 'update_forbidden', status: 403 elsif @payment.update_attributes(payment_params) respond_with(@payment, default_template: :show) else invalid_resource!(@payment)