Move app/routers/x402_enforcement.py verbatim to app/billing/x402/enforcement.py with a thin X402Enforcer class wrapper exposing the public API. The legacy app/routers/x402_enforcement.py becomes a re-export shim. Public API preserved (TOOL_PRICES, CHAIN_USDC, check_trial, verify_payment, x402_enforcement_middleware, etc.). Routes unchanged (56). Phase 3B of AUDIT-2026-Q3.md.
41 lines
1 KiB
Python
Executable file
41 lines
1 KiB
Python
Executable file
"""Backward-compat shim — moved to app.billing.x402.enforcement in P3B."""
|
|
from app.billing.x402.enforcement import * # noqa: F401,F403
|
|
from app.billing.x402.enforcement import ( # noqa: F401
|
|
X402Enforcer,
|
|
TOOL_PRICES,
|
|
CHAIN_USDC,
|
|
SECURITY_HEADERS,
|
|
check_idempotency,
|
|
check_trial,
|
|
consume_trial,
|
|
build_402_response,
|
|
parse_x_pay_header,
|
|
verify_payment,
|
|
verify_payment_via_router,
|
|
self_verify_evm_usdc,
|
|
x402_enforcement_middleware,
|
|
x402_discovery,
|
|
get_trial_status,
|
|
get_revenue,
|
|
get_pricing_suggestions,
|
|
request_refund,
|
|
_ensure_tool_prices,
|
|
_ensure_pay_addresses,
|
|
_ensure_verifier,
|
|
_get_pay_to_address,
|
|
_load_tool_prices,
|
|
_build_accepts_list,
|
|
_build_bazaar_extension,
|
|
_build_resource_info,
|
|
_build_discovery_response,
|
|
_resolve_pay_to,
|
|
_resolve_asset,
|
|
_build_extra,
|
|
_record_refundable_payment,
|
|
_verify_refund_ownership,
|
|
_detect_token_from_asset,
|
|
get_redis_async,
|
|
EVM_PAY_TO,
|
|
SOL_PAY_TO,
|
|
VERIFIER,
|
|
)
|