Update .env.example and settings.py for tribute payment configuration

- Revised the .env.example file to include updated settings for Telegram bot, database, and payment gateways, enhancing clarity for configuration.
- Added new fields for managing tribute payment notifications in settings.py, allowing for better control over cancellation notifications.
- Improved organization of payment method settings and localization options for a more streamlined user experience.
This commit is contained in:
machka-pasla
2025-08-05 23:33:46 +03:00
parent e537203209
commit 04e45096be
2 changed files with 75 additions and 70 deletions
+74 -70
View File
@@ -1,69 +1,72 @@
# Telegram Bot
BOT_TOKEN=
ADMIN_IDS=
DEFAULT_LANGUAGE=ru
DEFAULT_CURRENCY_SYMBOL=RUB
SUPPORT_LINK=
SERVER_STATUS_URL=
TERMS_OF_SERVICE_URL=
# Telegram Bot Token and Admin IDs
BOT_TOKEN=your_bot_token_here
ADMIN_IDS=comma_separated_admin_ids
# Database
POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_HOST=db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=remnawave-tg-shop-db
POSTGRES_PORT=5432
POSTGRES_DB=vpn_shop_db
POSTGRES_DB=postgres
# Webhooks
WEBHOOK_BASE_URL=
PANEL_WEBHOOK_SECRET=
# Localization and Display
DEFAULT_LANGUAGE="ru" # or "en"
DEFAULT_CURRENCY_SYMBOL="RUB" # e.g., RUB, USD, EUR
# YooKassa
YOOKASSA_ENABLED=True
YOOKASSA_SHOP_ID=
YOOKASSA_SECRET_KEY=
YOOKASSA_RETURN_URL=
YOOKASSA_DEFAULT_RECEIPT_EMAIL=
# External Links
SUPPORT_LINK=https://t.me/your_support_link
SERVER_STATUS_URL=https://status.yourdomain.tld/status/your_service
TERMS_OF_SERVICE_URL=https://example.com/tos
SUBSCRIPTION_MINI_APP_URL=
START_COMMAND_DESCRIPTION=
# Webhook Base URL (used for Telegram and payment providers)
WEBHOOK_BASE_URL=https://webhooks.yourdomain.tld
# YooKassa Payment Gateway Configuration
YOOKASSA_SHOP_ID=your_shop_id
YOOKASSA_SECRET_KEY=your_secret_key
YOOKASSA_RETURN_URL=https://t.me/your_bot
YOOKASSA_DEFAULT_RECEIPT_EMAIL=your_email@example.com
YOOKASSA_VAT_CODE=1
YOOKASSA_PAYMENT_MODE=full_prepayment
YOOKASSA_PAYMENT_SUBJECT=service
YOOKASSA_PAYMENT_SUBJECT=payment
# CryptoPay
CRYPTOPAY_ENABLED=True
# CryptoBot Payment Gateway Configuration
CRYPTOPAY_TOKEN=
CRYPTOPAY_NETWORK=mainnet
CRYPTOPAY_CURRENCY_TYPE=fiat
CRYPTOPAY_ASSET=RUB
# Telegram Stars
# Tribute Payment Gateway Configuration
TRIBUTE_API_KEY= # API key for verifying Tribute webhook signatures
TRIBUTE_SKIP_NOTIFICATIONS=True # Skip renewal notifications for Tribute payments
TRIBUTE_SKIP_CANCELLATION_NOTIFICATIONS=False # Skip cancellation notifications for Tribute payments
# Payment Method Toggles
YOOKASSA_ENABLED=True
STARS_ENABLED=True
# Telegram Tribute
TRIBUTE_ENABLED=True
TRIBUTE_API_KEY=
CRYPTOPAY_ENABLED=True
# Subscription Durations
# Subscription Options
1_MONTH_ENABLED=True
3_MONTHS_ENABLED=True
6_MONTHS_ENABLED=True
12_MONTHS_ENABLED=True
# Prices in RUB
RUB_PRICE_1_MONTH=
RUB_PRICE_3_MONTHS=
RUB_PRICE_6_MONTHS=
RUB_PRICE_12_MONTHS=
# Prices in Telegram Stars
STARS_PRICE_1_MONTH=
STARS_PRICE_3_MONTHS=
STARS_PRICE_6_MONTHS=
STARS_PRICE_12_MONTHS=
# Tribute Payment Links
RUB_PRICE_1_MONTH=150
STARS_PRICE_1_MONTH=0
TRIBUTE_LINK_1_MONTH=
3_MONTHS_ENABLED=True
RUB_PRICE_3_MONTHS=300
STARS_PRICE_3_MONTHS=0
TRIBUTE_LINK_3_MONTHS=
6_MONTHS_ENABLED=True
RUB_PRICE_6_MONTHS=500
STARS_PRICE_6_MONTHS=0
TRIBUTE_LINK_6_MONTHS=
12_MONTHS_ENABLED=True
RUB_PRICE_12_MONTHS=900
STARS_PRICE_12_MONTHS=0
TRIBUTE_LINK_12_MONTHS=
# Subscription Notifications
@@ -72,51 +75,52 @@ SUBSCRIPTION_NOTIFY_ON_EXPIRE=True
SUBSCRIPTION_NOTIFY_AFTER_EXPIRE=True
SUBSCRIPTION_NOTIFY_DAYS_BEFORE=3
# Referral Bonuses (Inviter)
# Referral Bonus Days
REFERRAL_BONUS_DAYS_1_MONTH=3
REFERRAL_BONUS_DAYS_3_MONTHS=7
REFERRAL_BONUS_DAYS_6_MONTHS=15
REFERRAL_BONUS_DAYS_12_MONTHS=30
# Referral Bonuses (Referee)
REFEREE_BONUS_DAYS_1_MONTH=1
REFEREE_BONUS_DAYS_3_MONTHS=3
REFEREE_BONUS_DAYS_6_MONTHS=7
REFEREE_BONUS_DAYS_12_MONTHS=15
# Panel Integration
PANEL_API_URL=
PANEL_API_KEY=
# Panel API Configuration
PANEL_API_URL=http://your_panel_api_url/api
PANEL_API_KEY=your_panel_api_key
PANEL_WEBHOOK_SECRET= # secret used to verify panel webhook signatures
# User traffic limits (applied for all users)
# 0 means unlimited
USER_TRAFFIC_LIMIT_GB=0
USER_TRAFFIC_STRATEGY=NO_RESET
USER_SQUAD_UUIDS=
USER_TRAFFIC_STRATEGY="NO_RESET"
# Trial Period
# Default Internal Squads for Users (Optional, comma-separated UUIDs)
USER_SQUAD_UUIDS=uuid1,uuid2,uuid3
# Trial Settings
TRIAL_ENABLED=True
TRIAL_DURATION_DAYS=3
TRIAL_TRAFFIC_LIMIT_GB=5.0
TRIAL_DURATION_DAYS=5
TRIAL_TRAFFIC_LIMIT_GB=0 # 0 for unlimited
TRIAL_TRAFFIC_STRATEGY="NO_RESET"
# Web Server
WEB_SERVER_HOST=0.0.0.0
# Web Server Settings (for handling webhooks)
WEB_SERVER_HOST="0.0.0.0"
WEB_SERVER_PORT=8080
# Admin Panel Log Pagination
LOGS_PAGE_SIZE=10
# Mini App
SUBSCRIPTION_MINI_APP_URL=
# Customization
START_COMMAND_DESCRIPTION=
# Logging
LOG_CHAT_ID=
LOG_THREAD_ID=
# Admin Logging Configuration
LOG_CHAT_ID=-1001234567890 # Telegram chat/group ID for admin notifications
LOG_THREAD_ID= # Optional: Thread ID for supergroup messages
LOG_NEW_USERS=True
LOG_PAYMENTS=True
LOG_PROMO_ACTIVATIONS=True
LOG_TRIAL_ACTIVATIONS=True
LOG_SUSPICIOUS_ACTIVITY=True
# Inline Thumbnails
# Inline Mode Thumbnails
INLINE_REFERRAL_THUMBNAIL_URL=https://cdn-icons-png.flaticon.com/512/1077/1077114.png
INLINE_USER_STATS_THUMBNAIL_URL=https://cdn-icons-png.flaticon.com/512/681/681494.png
INLINE_FINANCIAL_STATS_THUMBNAIL_URL=https://cdn-icons-png.flaticon.com/512/2769/2769339.png
+1
View File
@@ -67,6 +67,7 @@ class Settings(BaseSettings):
TRIBUTE_LINK_12_MONTHS: Optional[str] = Field(default=None)
TRIBUTE_API_KEY: Optional[str] = Field(default=None)
TRIBUTE_SKIP_NOTIFICATIONS: bool = Field(default=True, description="Skip renewal notifications for Tribute payments")
TRIBUTE_SKIP_CANCELLATION_NOTIFICATIONS: bool = Field(default=False, description="Skip cancellation notifications for Tribute payments")
PANEL_WEBHOOK_SECRET: Optional[str] = Field(default=None)
SUBSCRIPTION_NOTIFICATIONS_ENABLED: bool = Field(default=True)