diff --git a/agentscore_commerce/challenge/pricing.py b/agentscore_commerce/challenge/pricing.py index 451164d..34aebfe 100644 --- a/agentscore_commerce/challenge/pricing.py +++ b/agentscore_commerce/challenge/pricing.py @@ -1,9 +1,9 @@ """Pricing block builder + canonical type. Composes cents-denominated price components into the dollar-string shape that 402 -challenge bodies advertise. Lifts the inline pattern from martin-estate's -``purchase.ts`` so every merchant — current and future commerce-platform plugins -(Commerce7, WooCommerce, Shopify) — surfaces the same shape to agents. +challenge bodies advertise. Standardizes the pricing block so every merchant — +current and future commerce-platform plugins (Commerce7, WooCommerce, Shopify) — +surfaces the same shape to agents. Shipping is included by default because most physical-goods merchants carry it; pass ``shipping_cents=0`` (or omit) for digital goods / services. Tax is optional for diff --git a/agentscore_commerce/payment/idempotency.py b/agentscore_commerce/payment/idempotency.py index b09735b..ae0a49c 100644 --- a/agentscore_commerce/payment/idempotency.py +++ b/agentscore_commerce/payment/idempotency.py @@ -4,7 +4,7 @@ ``/v1/credentials/wallets`` capture endpoint dedupes correctly and the operator's ``transaction_count`` doesn't inflate. -Convention (matches what martin-estate uses today): +Convention: 1. Prefer the upstream payment-rail's stable identifier (Stripe PaymentIntent id, x402 tx hash) when one exists — those are already idempotent on their side. 2. Fall back to a synthesized ``pi-{order_id}-{amount_cents}`` key when no upstream id diff --git a/tests/test_skill_md.py b/tests/test_skill_md.py index 1447987..296e640 100644 --- a/tests/test_skill_md.py +++ b/tests/test_skill_md.py @@ -115,7 +115,7 @@ def test_rejects_name_over_64_chars(self) -> None: def test_rejects_uppercase_name(self) -> None: cfg = _base() - cfg.name = "Martin-Estate" + cfg.name = "Example-Merchant" with pytest.raises(ValueError, match=r"lowercase"): build_skill_md(cfg)