Automated Action f2b2889ea1 Implement complete Stripe payment integration service
- Created FastAPI application with Stripe payment processing
- Added payment intent creation, retrieval, and webhook handling
- Implemented SQLite database with payments and payment_methods tables
- Set up Alembic for database migrations
- Added comprehensive API endpoints for payment management
- Configured CORS middleware for cross-origin requests
- Added health check and service information endpoints
- Created complete project documentation with setup instructions
- Integrated Ruff for code formatting and linting
2025-06-20 12:23:34 +00:00

18 lines
503 B
Python

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from pathlib import Path
DB_DIR = Path("/app") / "storage" / "db"
DB_DIR.mkdir(parents=True, exist_ok=True)
SQLALCHEMY_DATABASE_URL = f"sqlite:///{DB_DIR}/db.sqlite"
engine = create_engine(
SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()