tweak payment text

This commit is contained in:
Michael Ball 2020-07-13 00:48:45 -07:00
parent fff156a453
commit 18ee10eef5

View file

@ -22,10 +22,15 @@ class Payment < ApplicationRecord
Ticket.total_price(conference, user, paid: false).cents Ticket.total_price(conference, user, paid: false).cents
end end
def stripe_description
#"ticket purchases(#{user.username})"
"Tickets for #{conference.title} #{user.name} #{user.email}"
end
def purchase def purchase
gateway_response = Stripe::Charge.create source: stripe_customer_token, gateway_response = Stripe::Charge.create source: stripe_customer_token,
receipt_email: stripe_customer_email, receipt_email: stripe_customer_email,
description: "ticket purchases(#{user.username})", description: stripe_description,
amount: amount_to_pay, amount: amount_to_pay,
currency: conference.tickets.first.price_currency currency: conference.tickets.first.price_currency