Sha256: 0d2a0ab9d5e99c151677adbc38eac99c75ebe556bcbef7db2a08c928fb4af3ef
Contents?: true
Size: 839 Bytes
Versions: 27
Compression:
Stored size: 839 Bytes
Contents
module Effective module Providers module Refund extend ActiveSupport::Concern def refund @order ||= Order.find(params[:id]) EffectiveOrders.authorize!(self, :update, @order) unless @order.refund? flash[:danger] = 'Unable to process refund order with a positive total' redirect_to effective_orders.order_path(@order) return end flash[:success] = EffectiveOrders.refund[:success].presence order_purchased( payment: 'refund. no payment required.', provider: 'refund', purchased_url: refund_params[:purchased_url], declined_url: refund_params[:declined_url] ) end def refund_params params.require(:refund).permit(:purchased_url, :declined_url) end end end end
Version data entries
27 entries across 27 versions & 1 rubygems