chore/ 删除无用文件
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""
|
||||
支付宝 OpenAPI 封装(从 payment 迁入 app)
|
||||
"""
|
||||
|
||||
from app.core.logging import get_logger
|
||||
from typing import Dict, Optional
|
||||
|
||||
@@ -27,6 +28,7 @@ class AlipayClient:
|
||||
if self._client is None:
|
||||
try:
|
||||
from alipay import AliPay
|
||||
|
||||
self._client = AliPay(
|
||||
appid=self._config.app_id,
|
||||
app_notify_url=self._config.notify_url,
|
||||
@@ -114,7 +116,11 @@ class AlipayClient:
|
||||
trade_status=unified_status,
|
||||
total_amount=total_amount,
|
||||
)
|
||||
error_msg = result.get("sub_msg", result.get("msg", "未知错误")) if result else "空结果"
|
||||
error_msg = (
|
||||
result.get("sub_msg", result.get("msg", "未知错误"))
|
||||
if result
|
||||
else "空结果"
|
||||
)
|
||||
raise PaymentQueryError(f"查询支付宝订单失败: {error_msg}")
|
||||
except PaymentQueryError:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user