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:
5
backend/config/initializers/i18n.rb
Normal file
5
backend/config/initializers/i18n.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
# Sito in italiano: locale fissa per ogni richiesta web (evita date tipo "July 02, 2026").
|
||||
Rails.application.config.after_initialize do
|
||||
I18n.available_locales = %i[it en]
|
||||
I18n.default_locale = :it
|
||||
end
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user