Sha256: 95e4cfb368c38d8acdb518cdb8a89d69c113fa5df4ededf124d16c33afe24435

Contents?: true

Size: 566 Bytes

Versions: 23

Compression:

Stored size: 566 Bytes

Contents

module Effective
  module Providers
    module Cheque
      extend ActiveSupport::Concern

      def cheque
        raise('cheque provider is not available') unless EffectiveOrders.cheque?

        @order ||= Order.deep.find(params[:id])

        EffectiveResources.authorize!(self, :update, @order)

        flash[:success] = EffectiveOrders.cheque[:success]

        order_deferred(provider: 'cheque', deferred_url: cheque_params[:deferred_url])
      end

      def cheque_params
        params.require(:cheque).permit(:deferred_url)
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
effective_orders-6.9.6 app/controllers/effective/providers/cheque.rb
effective_orders-6.9.5 app/controllers/effective/providers/cheque.rb
effective_orders-6.9.4 app/controllers/effective/providers/cheque.rb