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-6.4.4 app/controllers/effective/providers/pretend.rb
effective_orders-6.4.3 app/controllers/effective/providers/pretend.rb
effective_orders-6.4.2 app/controllers/effective/providers/pretend.rb
effective_orders-6.4.1 app/controllers/effective/providers/pretend.rb
effective_orders-6.4.0 app/controllers/effective/providers/pretend.rb
effective_orders-6.3.2 app/controllers/effective/providers/pretend.rb
effective_orders-6.3.1 app/controllers/effective/providers/pretend.rb
effective_orders-6.3.0 app/controllers/effective/providers/pretend.rb
effective_orders-6.2.1 app/controllers/effective/providers/pretend.rb
effective_orders-6.2.0 app/controllers/effective/providers/pretend.rb
effective_orders-6.1.5 app/controllers/effective/providers/pretend.rb
effective_orders-6.1.4 app/controllers/effective/providers/pretend.rb
effective_orders-6.1.3 app/controllers/effective/providers/pretend.rb
effective_orders-6.1.2 app/controllers/effective/providers/pretend.rb
effective_orders-6.1.1 app/controllers/effective/providers/pretend.rb
effective_orders-6.1.0 app/controllers/effective/providers/pretend.rb
effective_orders-6.0.1 app/controllers/effective/providers/pretend.rb
effective_orders-6.0.0 app/controllers/effective/providers/pretend.rb
effective_orders-5.9.4 app/controllers/effective/providers/pretend.rb
effective_orders-5.9.3 app/controllers/effective/providers/pretend.rb