Sha256: ecef4614f8126187dd9e9ada8bd80d04e3dbdd5e45ac15fd66f3ef9e1f443d88
Contents?: true
Size: 866 Bytes
Versions: 24
Compression:
Stored size: 866 Bytes
Contents
module Effective module Providers module Cheque extend ActiveSupport::Concern def pay_by_cheque @order ||= Order.find(params[:id]) @order.purchase_state = EffectiveOrders::PENDING @order.payment_provider = 'cheque' EffectiveOrders.authorized?(self, :update, @order) @page_title = 'Payment Required' if @order.save @order.send_pending_order_invoice_to_buyer! current_cart.try(:destroy) flash.now[:success] = 'Successfully indicated order will be payed by cheque.' else flash[:danger] = "Unable to save your order: #{@order.errors.full_messages.to_sentence}. Please try again." redirect_to effective_orders.order_path(@order) return end render 'effective/orders/cheque/pay_by_cheque' end end end end
Version data entries
24 entries across 24 versions & 1 rubygems