Sha256: 065c9fb84fa73dd5db4d12f2b38d25a37874c9401cf0d61d322b193d54e616bf

Contents?: true

Size: 584 Bytes

Versions: 30

Compression:

Stored size: 584 Bytes

Contents

module Effective
  module Providers
    module Pretend
      extend ActiveSupport::Concern

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

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

        order_purchased(
          payment: 'for pretend',
          provider: 'pretend',
          card: 'none',
          purchased_url: pretend_params[:purchased_url],
          declined_url: pretend_params[:declined_url]
        )
      end

      def pretend_params
        params.require(:pretend).permit(:purchased_url, :declined_url)
      end

    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
effective_orders-4.6.3 app/controllers/effective/providers/pretend.rb
effective_orders-4.6.2 app/controllers/effective/providers/pretend.rb
effective_orders-4.6.0 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.12 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.11 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.10 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.9 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.8 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.7 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.6 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.5 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.4 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.3 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.2 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.1 app/controllers/effective/providers/pretend.rb
effective_orders-4.5.0 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.10 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.9 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.8 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.7 app/controllers/effective/providers/pretend.rb