feat: add admin utility script to reconcile payment transactions and grant subscriptions

This commit is contained in:
2569718930@qq.com
2026-04-20 00:19:13 +08:00
parent f5fe8b9b95
commit 02c7787985
+4 -1
View File
@@ -14,6 +14,7 @@ Optional emergency fallback (manual grant if no matching intent):
from __future__ import annotations
import argparse
import importlib
import json
import os
import sys
@@ -25,7 +26,9 @@ PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if PROJECT_ROOT not in sys.path:
sys.path.insert(0, PROJECT_ROOT)
from src.payments.contract_checkout import PAYMENT_CHECKOUT, PaymentCheckoutError
_contract_checkout = importlib.import_module("src.payments.contract_checkout")
PAYMENT_CHECKOUT = _contract_checkout.PAYMENT_CHECKOUT
PaymentCheckoutError = _contract_checkout.PaymentCheckoutError
def _list_recent_intents(user_id: str, limit: int = 20) -> List[Dict[str, Any]]: