Sha256: 04888a1a61895f9c3e01537554ed64bfd4f8bb7c04826078d6b07ed47af57a81

Contents?: true

Size: 616 Bytes

Versions: 84

Compression:

Stored size: 616 Bytes

Contents

module Effective
  module Providers
    module Pretend
      extend ActiveSupport::Concern

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

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

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

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

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

    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
effective_orders-5.4.1 app/controllers/effective/providers/pretend.rb
effective_orders-5.4.0 app/controllers/effective/providers/pretend.rb
effective_orders-5.3.2 app/controllers/effective/providers/pretend.rb
effective_orders-5.3.1 app/controllers/effective/providers/pretend.rb
effective_orders-5.3.0 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.17 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.16 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.15 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.14 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.13 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.12 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.11 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.10 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.9 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.8 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.7 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.6 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.5 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.4 app/controllers/effective/providers/pretend.rb
effective_orders-5.2.3 app/controllers/effective/providers/pretend.rb