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_purchaseObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/effective/providers/pretend.rb', line 6

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

  EffectiveOrders.authorized?(self, :update, @order)

  order_purchased(
    details: 'for pretend',
    provider: 'pretend',
    card: 'none',
    redirect_url: params[:purchased_redirect_url],
    declined_redirect_url: params[:declined_redirect_url]
  )
end