Sha256: 6bd3068b626b5742be967f1c596ffe07503f754bc2f4c24972598eeead8d323e
Contents?: true
Size: 992 Bytes
Versions: 249
Compression:
Stored size: 992 Bytes
Contents
module Caboose class InvoiceTransactionsController < Caboose::ApplicationController # @route GET /admin/invoices/:invoice_id/transactions/:id/capture def admin_capture return if !user_is_allowed('invoices', 'edit') it = InvoiceTransaction.find(params[:id]) resp = params[:amount] ? it.capture(params[:amount].to_f) : it.capture render :json => resp end # @route GET /admin/invoices/:invoice_id/transactions/:id/refund def admin_refund return if !user_is_allowed('invoices', 'edit') it = InvoiceTransaction.find(params[:id]) resp = it.refund render :json => resp end # @route GET /admin/invoices/:invoice_id/transactions/:id/void def admin_void return if !user_is_allowed('invoices', 'edit') it = InvoiceTransaction.find(params[:id]) resp = it.void render :json => resp end end end
Version data entries
249 entries across 249 versions & 1 rubygems