Added name to paypal order

This commit is contained in:
Joan
2025-09-17 19:27:41 +02:00
parent b02e327aaf
commit 8bcf8c8819
2 changed files with 4 additions and 3 deletions

View File

@@ -527,9 +527,10 @@ async def confirm_callback(update: Update, context: CallbackContext):
await query.answer("Error: Ha habido un problema desconocido, contacta con el administrador.", show_alert=True)
return
user_name = participant['user_name']
total_price = len(reserved_numbers) * price_per_number
paypal_link, invoice_id = create_paypal_order(get_paypal_access_token(), total_price, raffle_info['id'], reserved_numbers)
paypal_link, invoice_id = create_paypal_order(get_paypal_access_token(), total_price, raffle_info['id'], reserved_numbers, user_name)
mark_reservation_pending(participant_db_id, invoice_id)
# Log the PayPal link for debugging