Sha256: d10cddde442c190048b8db93a3b8eae57346f98a82a444d641c4964e91e33760
Contents?: true
Size: 932 Bytes
Versions: 9
Compression:
Stored size: 932 Bytes
Contents
class Admin::OrdersController < AdminController respond_to :html def capture_payment respond_to do |format| format.html do @order = Order.find_by_number!(params[:id]) @order.kapture! redirect_to admin_order_path(@order), notice: "Amount was successfully captured" end end end def purchase_payment respond_to do |format| format.html do @order = Order.find_by_number!(params[:id]) @order.purchase! redirect_to admin_order_path(@order), notice: "Amount was successfully paid" end end end def index @orders = Order.order('id desc') respond_with @orders end def show @order = Order.find_by_number!(params[:id]) if @order.shipments.any? @shipment = @order.shipments.first else @shipment = @order.shipments.build @shipment.notify_customer = 1 end respond_with @order end end
Version data entries
9 entries across 9 versions & 1 rubygems