pénzügyi modul továbbfejlesztése (csomagkezelés)

This commit is contained in:
Roo
2026-07-29 09:46:10 +00:00
parent 6f28d3e70d
commit 75904cd2f8
50 changed files with 5851 additions and 312 deletions

View File

@@ -42,7 +42,15 @@ def get_financial_manager() -> FinancialManager:
"""
Dependency that provides a configured FinancialManager instance.
Currently uses MockPaymentGateway as default. To switch to Stripe:
Uses MockPaymentGateway in simulate_redirect mode as default.
In this mode, paid tiers (> 0 EUR) generate a checkout URL;
the frontend redirects the user to a mock payment page, and a
webhook callback (POST /billing/mock-payment/callback) finalizes
the payment and activates the subscription.
Free tiers ($0) bypass payment entirely and are activated immediately.
To switch to Stripe:
from app.services.stripe_adapter import StripeAdapter
return FinancialManager(payment_gateway=StripeAdapter())
@@ -50,7 +58,7 @@ def get_financial_manager() -> FinancialManager:
A FinancialManager instance with the configured payment gateway.
"""
return FinancialManager(
payment_gateway=MockPaymentGateway(mode="auto_approve"),
payment_gateway=MockPaymentGateway(mode="simulate_redirect"),
)