Sha256: 52f1c2305c812db1df3357f9082b442a18028561de9945a3852db40ba115cc8a

Contents?: true

Size: 677 Bytes

Versions: 16

Compression:

Stored size: 677 Bytes

Contents

module Effective
  module Providers
    module Etransfer
      extend ActiveSupport::Concern

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

        @order ||= Order.deep.find(params[:id])
        @order.current_user = current_user unless admin_checkout?(etransfer_params)

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

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

        order_deferred(provider: 'etransfer', deferred_url: etransfer_params[:deferred_url])
      end

      def etransfer_params
        params.require(:etransfer).permit(:deferred_url)
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
effective_orders-6.19.1 app/controllers/effective/providers/etransfer.rb
effective_orders-6.19.0 app/controllers/effective/providers/etransfer.rb
effective_orders-6.18.4 app/controllers/effective/providers/etransfer.rb
effective_orders-6.18.3 app/controllers/effective/providers/etransfer.rb
effective_orders-6.18.2 app/controllers/effective/providers/etransfer.rb
effective_orders-6.18.1 app/controllers/effective/providers/etransfer.rb
effective_orders-6.18.0 app/controllers/effective/providers/etransfer.rb
effective_orders-6.17.2 app/controllers/effective/providers/etransfer.rb
effective_orders-6.17.1 app/controllers/effective/providers/etransfer.rb
effective_orders-6.17.0 app/controllers/effective/providers/etransfer.rb
effective_orders-6.16.4 app/controllers/effective/providers/etransfer.rb
effective_orders-6.16.3 app/controllers/effective/providers/etransfer.rb
effective_orders-6.16.2 app/controllers/effective/providers/etransfer.rb
effective_orders-6.16.1 app/controllers/effective/providers/etransfer.rb
effective_orders-6.16.0 app/controllers/effective/providers/etransfer.rb
effective_orders-6.15.0 app/controllers/effective/providers/etransfer.rb