微信支付回调修复

This commit is contained in:
ahao 2025-03-13 10:31:40 +08:00
parent 317e1e8bee
commit 1ff60433a3

View File

@ -325,11 +325,11 @@ async def wxpay_notify(request: Request):
except Exception as e:
logging.error(f"回调处理异常: {str(e)}", exc_info=True)
if connection:
connection.rollback()
# if connection:
# connection.rollback()
return JSONResponse(content={"code": "FAIL", "message": "系统错误"}, status_code=500)
finally:
if cursor:
cursor.close()
if connection:
connection.close()
# finally:
# if cursor:
# cursor.close()
# if connection:
# connection.close()