migrated spr stuff
This commit is contained in:
1
artery/veins/mercadopago/core/__init__.py
Normal file
1
artery/veins/mercadopago/core/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""Core logic for MercadoPago mock API."""
|
||||
30
artery/veins/mercadopago/core/config.py
Normal file
30
artery/veins/mercadopago/core/config.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""Configuration for MercadoPago mock vein."""
|
||||
|
||||
from pathlib import Path
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
ENV_FILE = Path(__file__).parent.parent / ".env"
|
||||
|
||||
|
||||
class MercadoPagoMockConfig(BaseSettings):
|
||||
"""Configuration for MercadoPago (MOCK) vein."""
|
||||
|
||||
api_port: int = 8006
|
||||
mock_data_path: str = "./mock_data"
|
||||
|
||||
# Mock behavior
|
||||
enable_random_delays: bool = True
|
||||
min_delay_ms: int = 200
|
||||
max_delay_ms: int = 800
|
||||
error_rate: float = 0.0 # 0.0 to 1.0
|
||||
|
||||
# Default payment status
|
||||
default_payment_status: str = "approved" # approved, pending, rejected
|
||||
|
||||
model_config = {
|
||||
"env_file": ENV_FILE if ENV_FILE.exists() else None,
|
||||
"env_file_encoding": "utf-8",
|
||||
}
|
||||
|
||||
|
||||
settings = MercadoPagoMockConfig()
|
||||
Reference in New Issue
Block a user