Sha256: 135bcfba70ebfd3771db5614ff18f71fd17d68a6d048fb062e86f6de6b27c29f
Contents?: true
Size: 737 Bytes
Versions: 2
Compression:
Stored size: 737 Bytes
Contents
module Effective module Providers module AppCheckout extend ActiveSupport::Concern def app_checkout @order = Order.find(params[:id]) checkout = EffectiveOrders.app_checkout[:service].call(order: @order) if checkout.success? order_purchased(payment_details(checkout)) else flash = EffectiveOrders.app_checkout[:declined_flash] order_declined(payment_details(checkout), nil, flash: flash) end end def payment_details(checkout) default = 'App Checkout' if checkout.respond_to?(:payment_details) checkout.payment_details.presence || default else default end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
effective_orders-1.8.1 | app/controllers/effective/providers/app_checkout.rb |
effective_orders-1.8.0 | app/controllers/effective/providers/app_checkout.rb |