-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_example.py
More file actions
82 lines (70 loc) · 2.38 KB
/
config_example.py
File metadata and controls
82 lines (70 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"""
配置文件示例
复制此文件为 config.py 并填入你的实际配置
"""
# TRON 配置
TRON_WALLET_ADDRESS = "TYourWalletAddressHere" # 你的 TRON 收款地址
TRONSCAN_API_KEY = "your-tronscan-api-key" # 从 https://tronscan.org 获取
# 支付系统配置
PAYMENT_CONFIG = {
'poll_interval': 15, # 轮询间隔(秒),建议 10-30
'default_timeout': 30, # 默认订单超时(分钟),建议 15-60
'min_confirmations': 1, # 最小区块确认数,建议 1-3
'db_path': 'orders.db' # 数据库文件路径
}
# Telegram Bot 配置
TELEGRAM_BOT_TOKEN = "your-telegram-bot-token"
TELEGRAM_ADMIN_IDS = [123456789] # 管理员 Telegram ID 列表
# Discord Bot 配置
DISCORD_BOT_TOKEN = "your-discord-bot-token"
DISCORD_GUILD_ID = 123456789 # 服务器 ID
# 价格配置
PRICING = {
'vip_month': {
'name': 'VIP 月卡',
'price': 10.0, # USDT 价格
'duration': 30, # 天数,0 表示终身
'description': '30天 VIP 权限'
},
'vip_year': {
'name': 'VIP 年卡',
'price': 100.0,
'duration': 365,
'description': '365天 VIP 权限,省下 20 USDT!'
},
'premium': {
'name': 'Premium 终身',
'price': 500.0,
'duration': 0,
'description': '终身 Premium 权限'
}
}
# 日志配置
LOGGING_CONFIG = {
'level': 'INFO', # DEBUG, INFO, WARNING, ERROR
'format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s',
'file': 'payment.log' # 日志文件路径,None 表示只输出到控制台
}
# 通知配置
NOTIFICATION_CONFIG = {
'enable_email': False,
'email_host': 'smtp.gmail.com',
'email_port': 587,
'email_user': 'your-email@gmail.com',
'email_password': 'your-password',
'email_to': 'admin@example.com'
}
# 自动清理配置
AUTO_CLEANUP = {
'enabled': True,
'interval_days': 90, # 每 90 天清理一次
'keep_days': 90 # 保留最近 90 天的超时/取消订单
}
# TRC20-USDT 合约地址(主网,不要修改)
USDT_CONTRACT_ADDRESS = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
# 测试网配置(开发时使用)
TEST_MODE = False
if TEST_MODE:
TRON_WALLET_ADDRESS = "TTestWalletAddress"
TRONSCAN_API_KEY = "test-api-key"
USDT_CONTRACT_ADDRESS = "TXYZopYRdj2D9XRtbG411XZZ3Q5Z8VWLk7" # Nile 测试网