Sha256: 0ee732e14959cfef781f57cb3a15e5d01a52ee29de20f001c884f322958fda6a
Contents?: true
Size: 987 Bytes
Versions: 16
Compression:
Stored size: 987 Bytes
Contents
module Effective module Providers module Pretend extend ActiveSupport::Concern def pretend raise('pretend provider is not available') unless EffectiveOrders.pretend? @order ||= Order.deep.find(params[:id]) @order.current_user = current_user unless admin_checkout?(pretend_params) EffectiveResources.authorize!(self, :update, @order) if params[:commit].to_s.include?('Decline') order_declined( payment: 'for pretend', provider: 'pretend', card: 'none', declined_url: pretend_params[:declined_url] ) else order_purchased( payment: 'for pretend', provider: 'pretend', card: 'none', purchased_url: pretend_params[:purchased_url] ) end end def pretend_params params.require(:pretend).permit(:purchased_url, :declined_url) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems