fix refund stuff

timetoconfirm
Raz 7 months ago
parent 01a2c8880b
commit 3e0b51c4c9
  1. 5
      tournaments/models/team_registration.py
  2. 2
      tournaments/services/payment_service.py
  3. 2
      tournaments/templates/tournaments/tournament_info.html

@ -333,7 +333,6 @@ class TeamRegistration(SideStoreModel):
def confirm_registration(self, payment_intent_id=None):
"""Confirm the team's registration after being moved from waiting list"""
now = timezone.now()
# Update all players in the team
for player in self.players_sorted_by_rank:
player.time_to_confirm = None
@ -343,10 +342,6 @@ class TeamRegistration(SideStoreModel):
player.registration_status = RegistrationStatus.CONFIRMED
player.save()
# Save confirmation date
self.confirmation_date = now
self.save()
# Add to TeamRegistration class in team_registration.py
def get_payment_status(self):
"""

@ -328,7 +328,7 @@ class PaymentService:
TournamentEmailService.send_refund_confirmation(tournament, team_registration, refund)
# Return success with refund object
return True, "Votre inscription a été remboursée automatiquement.", refund
return True, "L'inscription a été remboursée automatiquement.", refund
except stripe.error.StripeError as e:
return False, f"Erreur de remboursement Stripe: {str(e)}", None

@ -116,7 +116,7 @@
<div class="topmargin20">
{% if tournament.is_refund_possible and team.is_paid %}
<p class="alert alert-info">
<span class="icon">💰</span> Si vous vous désinscrivez, votre inscription sera remboursée automatiquement sur votre carte bancaire.
Si vous vous désinscrivez, votre inscription sera remboursée automatiquement sur votre carte bancaire.
{% if tournament.refund_date_limit %}
<br><small>Remboursement possible jusqu'au {{ tournament.refund_date_limit|date:"d/m/Y à H:i" }}</small>
{% endif %}

Loading…
Cancel
Save