Sha256: 9fc5d26e0a1e336df882a7e51f1ca1da5ca441e4393dfbba390fbb9bdd0adc51

Contents?: true

Size: 637 Bytes

Versions: 16

Compression:

Stored size: 637 Bytes

Contents

module Effective
  module Providers
    module Phone
      extend ActiveSupport::Concern

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

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

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

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

        order_deferred(provider: 'phone', deferred_url: phone_params[:deferred_url])
      end

      def phone_params
        params.require(:phone).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/phone.rb
effective_orders-6.19.0 app/controllers/effective/providers/phone.rb
effective_orders-6.18.4 app/controllers/effective/providers/phone.rb
effective_orders-6.18.3 app/controllers/effective/providers/phone.rb
effective_orders-6.18.2 app/controllers/effective/providers/phone.rb
effective_orders-6.18.1 app/controllers/effective/providers/phone.rb
effective_orders-6.18.0 app/controllers/effective/providers/phone.rb
effective_orders-6.17.2 app/controllers/effective/providers/phone.rb
effective_orders-6.17.1 app/controllers/effective/providers/phone.rb
effective_orders-6.17.0 app/controllers/effective/providers/phone.rb
effective_orders-6.16.4 app/controllers/effective/providers/phone.rb
effective_orders-6.16.3 app/controllers/effective/providers/phone.rb
effective_orders-6.16.2 app/controllers/effective/providers/phone.rb
effective_orders-6.16.1 app/controllers/effective/providers/phone.rb
effective_orders-6.16.0 app/controllers/effective/providers/phone.rb
effective_orders-6.15.0 app/controllers/effective/providers/phone.rb