Module: Effective::Providers::Pretend
- Extended by:
- ActiveSupport::Concern
- Included in:
- OrdersController
- Defined in:
- app/controllers/effective/providers/pretend.rb
Instance Method Summary collapse
Instance Method Details
#pretend ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/effective/providers/pretend.rb', line 6 def pretend raise('pretend provider is not available') unless EffectiveOrders.pretend? @order ||= Order.find(params[:id]) EffectiveResources.(self, :update, @order) order_purchased( payment: 'for pretend', provider: 'pretend', card: 'none', purchased_url: pretend_params[:purchased_url] ) end |
#pretend_params ⇒ Object
21 22 23 |
# File 'app/controllers/effective/providers/pretend.rb', line 21 def pretend_params params.require(:pretend).permit(:purchased_url, :declined_url) end |