Billing: fatture manuali, profilo obbligatorio e piani Stripe mensile/annuale.

Rimuove link al portale Stripe in area cliente, aggiunge flusso admin per PDF
fattura e email, blocca checkout senza dati di fatturazione, allinea prezzi
a €4,90/€39,90 e €9,90/€69,90, locale italiano e documentazione deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 17:10:12 +02:00
parent 148402a97c
commit a5e781729c
78 changed files with 2457 additions and 424 deletions

View File

@@ -40,12 +40,33 @@ module MatchLiveTv
ENV["STRIPE_WEBHOOK_SECRET"].presence
end
def stripe_premium_light_yearly_price_id
ENV["STRIPE_PREMIUM_LIGHT_YEARLY_PRICE_ID"].presence ||
ENV["STRIPE_PREMIUM_LIGHT_PRICE_ID"].presence ||
ENV["STRIPE_PREMIUM_PRICE_ID"].presence
end
def stripe_premium_light_monthly_price_id
ENV["STRIPE_PREMIUM_LIGHT_MONTHLY_PRICE_ID"].presence
end
def stripe_premium_full_yearly_price_id
ENV["STRIPE_PREMIUM_FULL_YEARLY_PRICE_ID"].presence ||
ENV["STRIPE_PREMIUM_FULL_PRICE_ID"].presence ||
ENV["STRIPE_PREMIUM_PRICE_ID"].presence
end
def stripe_premium_full_monthly_price_id
ENV["STRIPE_PREMIUM_FULL_MONTHLY_PRICE_ID"].presence
end
# Retrocompatibilità
def stripe_premium_light_price_id
ENV.fetch("STRIPE_PREMIUM_LIGHT_PRICE_ID", ENV.fetch("STRIPE_PREMIUM_PRICE_ID", ""))
stripe_premium_light_yearly_price_id.to_s
end
def stripe_premium_full_price_id
ENV.fetch("STRIPE_PREMIUM_FULL_PRICE_ID", ENV.fetch("STRIPE_PREMIUM_PRICE_ID", ""))
stripe_premium_full_yearly_price_id.to_s
end
def stripe_enabled?