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.4.6 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.5 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.4 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.3 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.2 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.1 app/controllers/effective/providers/pretend.rb
effective_orders-4.4.0 app/controllers/effective/providers/pretend.rb
effective_orders-4.3.2 app/controllers/effective/providers/pretend.rb
effective_orders-4.3.1 app/controllers/effective/providers/pretend.rb
effective_orders-4.3.0 app/controllers/effective/providers/pretend.rb