{% extends 'base.html.twig' %} {% block title %}Abonnement Premium — CSI World{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% macro planPerks(plan) %} {% set tierLabel = plan.tier|capitalize %} {% set zoneAccess = { bronze: 'Zones Bronze ou plus', argent: 'Zones Argent ou plus', gold: 'Zones Gold ou plus', platine: 'Toutes les zones Premium', } %} {% endmacro %} {% block body %} {% import _self as perks %}
← Retour à la carte
Changement de plan en cours…
PayPal confirme l'opération, cela prend quelques secondes.
Abonnement Premium CSI World Online
{% if activeSub %} {% set isCancelled = activeSub.status == 'cancelled' %}
{% if isCancelled %} ● Abonnement annulé — accès jusqu'au {{ activeSub.currentPeriodEnd|date('d/m/Y') }} {% else %} ● Abonné {% endif %}
{% set isCreditsSub = activeSub.paymentMethod == 'credits' %}
{% if isCancelled %} Votre abonnement a été annulé. Vous conservez l'accès Premium jusqu'au {{ activeSub.currentPeriodEnd|date('d/m/Y') }}, puis votre compte redeviendra gratuit (aucun prélèvement futur). {% elseif isCreditsSub %} Abonnement payé en Crédits MasterMoney — expire le {{ activeSub.currentPeriodEnd|date('d/m/Y') }} (pas de renouvellement automatique). {% else %} Renouvellement automatique le {{ activeSub.currentPeriodEnd|date('d/m/Y') }}. {% endif %}
Plan : {{ activeSub.plan.name }} {% if isCreditsSub %} — {{ activeSub.plan.creditsPrice|number_format(0, ',', ' ') }} Crédits MM {% else %} — {{ (activeSub.plan.priceCents / 100)|number_format(2, ',', ' ') }} € / mois {% endif %}
{% if not isCancelled and isCreditsSub %}
Les abonnements payés en Crédits MasterMoney ne donnent pas droit aux récompenses hebdomadaires (Dollawrs/Crédits).
{% endif %} {% if not isCancelled and not isCreditsSub and weeklyClaim and weeklyClaim.money + weeklyClaim.premium > 0 %}
Récompenses hebdomadaires
Tu peux réclamer une fois par semaine tant que ton abonnement est actif.
{% if weeklyClaim.money > 0 %} +{{ weeklyClaim.money|number_format(0, ',', ' ') }} Dollawrs {% endif %} {% if weeklyClaim.premium > 0 %} +{{ weeklyClaim.premium|number_format(0, ',', ' ') }} Crédits MM {% endif %}
{% if not weeklyClaim.available and weeklyClaim.nextClaimAt %}
Prochaine récompense dans …
{% endif %}
{% endif %} {% if not isCancelled %}
Vous conserverez l'accès jusqu'au {{ activeSub.currentPeriodEnd|date('d/m/Y') }}, aucun remboursement ne sera effectué.
{# Le changement de plan passe par l'API PayPal "revise" — indisponible pour un abonnement payé en crédits (pas d'ID PayPal). #} {# Si l'abonné est annuel, on ne propose que des plans annuels (règle métier : annual → annual seulement) #} {% set otherPlans = isCreditsSub ? [] : plans|filter(p => p.id != activeSub.plan.id and p.paypalPlanId and (not activeSub.plan.isAnnual or p.isAnnual) ) %} {% if otherPlans|length > 0 %}
Changer de plan

Le changement prend effet au prochain cycle de facturation ({{ activeSub.currentPeriodEnd|date('d/m/Y') }}). Aucune double facturation ni remboursement pour la période déjà payée.

{% if activeSub.plan.isAnnual %}

Votre engagement annuel vous donne accès aux autres plans annuels uniquement. Une bascule vers le mensuel n'est pas possible.

{% endif %}
{% for otherPlan in otherPlans %}
{{ otherPlan.tier|capitalize }} {{ otherPlan.isAnnual ? 'Annuel' : 'Mensuel' }}
{{ otherPlan.name }}
{{ (otherPlan.priceCents / 100)|number_format(2, ',', ' ') }} € / {{ otherPlan.isAnnual ? 'an' : 'mois' }}
{{ perks.planPerks(otherPlan) }}
{% endfor %}
{% endif %} {% endif %} {% else %}
● Non abonné
{% set readyPlans = plans|filter(p => p.paypalPlanId or p.creditsPrice > 0) %} {% if readyPlans|length > 0 %} {# Pré-calcule un map tier → priceCents mensuel pour les économies des cartes annuelles #} {% set monthlyByTier = {} %} {% for p in readyPlans|filter(p => p.billingPeriod == 'monthly') %} {% set monthlyByTier = monthlyByTier|merge({(p.tier): p.priceCents}) %} {% endfor %}
{% for plan in readyPlans %} {% set monthlyPrice = monthlyByTier[plan.tier] ?? 0 %} {% set annualSavings = plan.billingPeriod == 'annual' and monthlyPrice > 0 ? (monthlyPrice * 12 - plan.priceCents) : 0 %}
{{ plan.tier|capitalize }}
{{ plan.name }}
{{ (plan.priceCents / 100)|number_format(2, ',', ' ') }} € / {{ plan.billingPeriod == 'annual' ? 'an' : 'mois' }}
{% if annualSavings > 0 %} Économisez {{ (annualSavings / 100)|number_format(2, ',', ' ') }} € {% endif %} {% if plan.description %}
{{ plan.description }}
{% endif %} {{ perks.planPerks(plan) }} {% if plan.creditsPrice > 0 %} {% if app.user.premiumMoney < plan.creditsPrice %}
Crédits insuffisants ({{ app.user.premiumMoney|number_format(0, ',', ' ') }} disponibles)
{% else %}
Achat unique, sans renouvellement automatique.
{% endif %} {% endif %} {% if plan.creditsPrice > 0 and plan.paypalPlanId %}
ou payer par carte
{% endif %} {% if plan.paypalPlanId %}
{% endif %}
{% endfor %}
{% else %}
Les plans d'abonnement ne sont pas encore configurés. Reviens plus tard !
{% endif %} {% endif %}
{% if history|length > 0 %}
Historique
{% for sub in history %} {% endfor %}
Plan Statut Début Fin de période
{{ sub.plan.name }} {% if sub.status == 'active' %} Actif {% elseif sub.status == 'cancelled' %} Annulé {% else %} {{ sub.status }} {% endif %} {{ sub.startsAt ? sub.startsAt|date('d/m/Y') : '—' }} {{ sub.currentPeriodEnd ? sub.currentPeriodEnd|date('d/m/Y') : '—' }}
{% endif %}
{% endblock %}