pénzügyi modul továbbfejlesztése (csomagkezelés)
This commit is contained in:
@@ -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"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user