12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/effective/providers/app_checkout.rb', line 12
def app_checkout
@order = Order.find(params[:id])
checkout = EffectiveOrders.app_checkout[:service].call(order: @order)
if checkout.success?
order_purchased(details: payment_details(checkout), provider: 'app_checkout', card: 'none')
else
flash = EffectiveOrders.app_checkout[:declined_flash]
order_declined(details: payment_details(checkout), message: flash, provider: 'app_checkout', card: 'none')
end
end
|