Sha256: cb199dad461c7b6e67c1c1717e5669ff9cbbe6c393413e107baac22503d87117

Contents?: true

Size: 665 Bytes

Versions: 15

Compression:

Stored size: 665 Bytes

Contents

module OrderHelper

  def pay_for_tickets(ticket_sales_id, options = {})
    begin
      return "pay form will appear here" unless ticket_sales_id 
      @ticket_sale = TicketSale.find(ticket_sales_id)
      return "invalid user" unless @ticket_sale.user_id == current_user.id
      
      return "These tickets have already been paid for" if @ticket_sale.paid_at
      @order = Order.new
      @order.email = current_user.email
      @order.firstname = @ticket_sale.firstname
      @order.lastname = @ticket_sale.lastname

      kit_render :partial=>"order/pay_for_tickets", :locals=>{:options=>options}
    rescue Exception => e
      e.message
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/helpers/order_helper.rb
kit_cms-2.3.20 app/helpers/order_helper.rb
kit_cms-2.3.19 app/helpers/order_helper.rb
kit_cms-2.3.18 app/helpers/order_helper.rb
kit_cms-2.3.17 app/helpers/order_helper.rb
kit_cms-2.3.16 app/helpers/order_helper.rb
kit_cms-2.3.15 app/helpers/order_helper.rb
kit_cms-2.3.14 app/helpers/order_helper.rb
kit_cms-2.3.13 app/helpers/order_helper.rb
kit_cms-2.3.11 app/helpers/order_helper.rb
kit_cms-2.3.10 app/helpers/order_helper.rb
kit_cms-2.3.9 app/helpers/order_helper.rb
kit_cms-2.3.8 app/helpers/order_helper.rb
kit_cms-2.3.7 app/helpers/order_helper.rb
kit_cms-2.3.6 app/helpers/order_helper.rb