From 02c7787985528cdf2305f4f3611209acc3452414 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 20 Apr 2026 00:19:13 +0800 Subject: [PATCH] feat: add admin utility script to reconcile payment transactions and grant subscriptions --- scripts/reconcile_payment_tx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/reconcile_payment_tx.py b/scripts/reconcile_payment_tx.py index 0b8320ad..024ea9a0 100644 --- a/scripts/reconcile_payment_tx.py +++ b/scripts/reconcile_payment_tx.py @@ -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]]: