Skip to content

Commit 74f11fa

Browse files
catInOrbitnorbusan
authored andcommitted
updated paymentIntent object to have description from invoice's event
1 parent af54282 commit 74f11fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/api/helpers/payment.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ def get_payment_intent_stripe(order_invoice, currency=None, credentials=None):
114114
if not currency or currency == "":
115115
currency = "USD"
116116

117+
event_name = order_invoice.event.name
118+
117119
try:
118120
payment_intent = stripe.PaymentIntent.create(
119121
amount=int(order_invoice.amount * 100),
@@ -122,6 +124,7 @@ def get_payment_intent_stripe(order_invoice, currency=None, credentials=None):
122124
automatic_payment_methods={
123125
'enabled': True,
124126
},
127+
description=f"Eventyay {event_name}"
125128
)
126129
return payment_intent
127130

0 commit comments

Comments
 (0)