| 1 | """Permanent stubs for live AgentCore / AWS payment paths. |
| 2 | |
| 3 | Live gates are intentionally omitted from this Omnipay adaptation. Callers |
| 4 | receive SKIPPED / NOT_READY without any network I/O or credential use. |
| 5 | """ |
| 6 | |
| 7 | from __future__ import annotations |
| 8 | |
| 9 | from typing import Any, Literal |
| 10 | |
| 11 | |
| 12 | def live_agentcore_status() -> dict[str, Any]: |
| 13 | """Report that the connected AgentCore Payments path is out of scope.""" |
| 14 | |
| 15 | return { |
| 16 | "status": "SKIPPED", |
| 17 | "reason": "NOT_READY", |
| 18 | "provider": "agentcore_payments", |
| 19 | "value_transferred": False, |
| 20 | "network_calls": False, |
| 21 | "message": ( |
| 22 | "Live Amazon Bedrock AgentCore Payments is intentionally omitted " |
| 23 | "from the Omnipay local simulation. Use LocalPaymentProcessor only." |
| 24 | ), |
| 25 | } |
| 26 | |
| 27 | |
| 28 | def create_live_payment_session(*_args: Any, **_kwargs: Any) -> dict[str, Any]: |
| 29 | """Refuse any attempt to open a live payment session.""" |
| 30 | |
| 31 | return live_agentcore_status() |
| 32 | |
| 33 | |
| 34 | def authorize_live_payment(*_args: Any, **_kwargs: Any) -> dict[str, Literal[False] | str]: |
| 35 | """Refuse any attempt to authorize a live payment.""" |
| 36 | |
| 37 | status = live_agentcore_status() |
| 38 | return { |
| 39 | "ok": False, |
| 40 | "status": status["status"], |
| 41 | "reason": status["reason"], |
| 42 | "value_transferred": False, |
| 43 | } |