This commit is contained in:
lz_db
2026-10-25 20:30:33 +08:00
parent 1d9cd1f9c7
commit 074229f417
14 changed files with 222 additions and 19 deletions
Binary file not shown.
+4 -3
View File
@@ -1,9 +1,10 @@
"""USDT (TRC20) 渠道:唯一金额生成。
USDT 无支付平台回调,到账依赖服务端轮询 TronGrid(每 15s):
匹配条件 = 收款地址一致 + 金额(含尾差)精确相等 + 转账时间在订单有效期内 + 确认数 >= 19;
USDT 无支付平台回调,到账由服务端每 15s 轮询 TronGrid 完成
(settle_service.poll_usdt_deposits,随 main.py lifespan 启动):
匹配条件 = 收款地址一致 + 金额(含尾差)精确相等 + 转账时间在订单有效期内 + 交易已固化(≥19 确认);
匹配成功即入账(tx_hash 写入 third_trade_no,唯一索引保证幂等)。
当前以 Celery worker 部署后实现轮询任务;开发期可用后台"人工补单"入账。
后台另有"人工补单"入口兜底(链上查询异常时手动核实入账)。
"""
import random
from decimal import ROUND_HALF_UP, Decimal