's'
This commit is contained in:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user