Add page_config support to get_checkout for per-page SumUp credentials

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-18 18:37:55 +00:00
parent 3aa1aadd0b
commit d805af0764

View File

@@ -115,9 +115,13 @@ async def create_checkout(
return data
async def get_checkout(checkout_id: str) -> Dict[str, Any]:
async def get_checkout(checkout_id: str, page_config: Any | None = None) -> Dict[str, Any]:
"""Fetch checkout status/details from SumUp."""
settings = _sumup_settings()
if page_config and getattr(page_config, "sumup_api_key", None):
settings["api_key"] = page_config.sumup_api_key
headers = {
"Authorization": f"Bearer {settings['api_key']}",
"Content-Type": "application/json",