osem-fcy/app/views/payments/_payment.html.haml

33 lines
1.2 KiB
Text
Raw Normal View History

2016-07-27 19:42:42 +05:30
.div
.col-md-12.table-responsive
2020-01-29 16:51:27 -08:00
%table.table.table-hover.table-striped
2016-07-27 19:42:42 +05:30
%thead
%tr
%th Ticket
%th Quantity
%th Price
%th Total
%tbody
- @unpaid_ticket_purchases.each do |ticket|
%tr
%td
= ticket.title
%td
= ticket.quantity
%td
= humanized_money_with_symbol ticket.price
%td
= humanized_money_with_symbol ticket.quantity * ticket.price
= form_tag conference_payments_path(@conference.short_title, :has_registration_ticket => @has_registration_ticket) do
2020-02-04 20:49:22 -08:00
%script.stripe-button{'src': "https://checkout.stripe.com/checkout.js",
'data': {amount: @total_amount_to_pay.cents,
label: "Pay #{humanized_money_with_symbol @total_amount_to_pay}",
email: current_user.email,
currency: @total_amount_to_pay.currency,
name: ENV['OSEM_NAME'] || 'OSEM',
description: "#{ENV['OSEM_NAME']} tickets",
key: ENV['STRIPE_PUBLISHABLE_KEY'] || Rails.application.secrets.stripe_publishable_key, locale: "auto"}}
2020-01-29 16:51:27 -08:00
= link_to('Edit Purchase', conference_tickets_path(@conference.short_title),
class: 'btn btn-default')