6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# 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.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],
current_user: current_user
)
end
end
|