This commit is contained in:
eric
2026-06-08 06:05:31 -05:00
parent ebfec37e47
commit 06ab949d81
77 changed files with 3646 additions and 358 deletions

View File

@@ -232,11 +232,16 @@ class XorPayProvider:
return _md5(raw) == str(data.get("sign", ""))
def parse_notify(self, data: dict[str, Any]) -> dict[str, Any]:
pay_price = str(data.get("pay_price", "")).strip()
try:
paid = float(pay_price) > 0
except (TypeError, ValueError):
paid = False
return {
"order_id": str(data.get("order_id", "")),
"trade_no": str(data.get("aoid", "")),
"pay_price": str(data.get("pay_price", "")),
"trade_status": "success",
"pay_price": pay_price,
"trade_status": "success" if paid else "pending",
}
async def query_order_status(self, order_id: str, timeout: float = 8.0) -> dict[str, Any]: