Implement ops operational closure

This commit is contained in:
2569718930@qq.com
2026-06-23 17:07:25 +08:00
parent 24415ee427
commit 0c76874418
27 changed files with 2196 additions and 24 deletions
+14
View File
@@ -2201,6 +2201,20 @@ class PaymentContractCheckoutService:
prefer="resolution=merge-duplicates,return=minimal",
allowed_status=[200, 201],
)
if str(status or "").strip().lower() == "refund_required":
self._db.append_payment_audit_event(
"payment_refund_required",
{
"reason": "refund_required",
"detail": detail,
"intent_id": intent.intent_id,
"user_id": getattr(intent, "user_id", "") or "",
"tx_hash": tx_hash_text,
"chain_id": int(intent.chain_id),
"from_address": _normalize_address(from_address) or "",
"receiver_expected": intent.receiver_address,
},
)
return {}
except Exception:
return {}