Skip to content

Commit d8a8243

Browse files
vvillait88claude
andcommitted
docs(examples): compliance_merchant uses retry_step instead of duplicating retry in extra_steps
Mirror of node-commerce 363bda4. Switch the example from extra_steps[0] re-stating the canonical retry to retry_step REPLACING the canonical step 5 with the merchant-specific retry. extra_steps now holds only the genuinely additional 402-payment follow-up step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fb01267 commit d8a8243

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

examples/compliance_merchant.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@
4545

4646
SUPPORT_EMAIL = "support@example.com"
4747

48-
# Vendor-specific extension of the canonical agent_instructions block. Commerce defaults cover
49-
# steps 1-5 (present verify_url, poll, extract token, retry). We append steps 6-7 describing how
50-
# to RESUME a pending order with order_id + complete the eventual 402 payment.
48+
# Vendor-specific extension of the canonical agent_instructions block. The commerce default
49+
# covers steps 1-4 (present verify_url, poll, user verifies, extract token) plus a generic
50+
# "retry the original merchant request" at step 5. ``retry_step`` REPLACES that generic step 5
51+
# with our merchant-specific retry (include order_id to resume the pending order). ``extra_steps``
52+
# adds the genuinely-additional 402-payment step that comes AFTER retry.
5153
VERIFICATION_INSTRUCTIONS = verification_agent_instructions(
52-
extra_steps=[
54+
retry_step=(
5355
"Retry the request with header X-Operator-Token set to the operator_token value AND include the "
54-
"order_id from this 403 in the body to resume the pending order.",
56+
"order_id from this 403 in the body to resume the pending order."
57+
),
58+
extra_steps=[
5559
"The retry returns 402 Payment Required with a payment challenge. Pay via tempo request or agentscore-pay pay.",
5660
],
5761
order_ttl="Pending orders expire after 1 hour. If the order expires, start a new request.",

0 commit comments

Comments
 (0)