Repository navigation
chore: adopt ecommerce 0.3.0 and automation 0.6.1, use the plugin's order token and rejection causes - #17
Merged
Conversation
…rder token and rejection causes - Order links use the plugin's per-order accessToken, checked with orders.getOrderByToken; the site's own HMAC token is removed. - placeOrder reads the cause of a rejected order with getOrderRejection and words stock and coupon rejections itself instead of matching the message. - Workflow runs no longer store the access token of the order that triggered them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
…e2e tests in CI .env.example sets NORMAL and explains what it trades away; the code's default stays FULL. Playwright no longer retries in CI, so a test that fails once is reported as failed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades
@xtr-dev/payload-ecommerceto 0.3.0 and@xtr-dev/payload-automationto 0.6.1.Order link token
accessToken, andgetOrderForVisitorchecks it withorders.getOrderByToken({ orderNumber, token }). A signed-in member still opens their own order without a token, and an admin any order.orderPath(order)builds the link from an order read by server code (Local API). It is used for the payment'sredirectUrland for the links in the confirmation and shipped emails, which both re-read the order before sending.src/plugins/automation.tsnow removesaccessTokenbefore a run is stored.Rejected orders
placeOrderno longer matches the error message with a regular expression. It reads the cause withgetOrderRejection(error)andorderRefusalwords it: which product is short and how many are left, or why the code no longer applies.Other 0.3.0 changes
createOrderFromCartrequires everything inorderData: the site already passed it that way.expiredis reported with reasonexpired; the site words refusals from the reason, and a test case covers it.usageCountis still set through the Local API in tests, which the plugin allows.Math.roundon integer cents, so no amounts change.Automation 0.6.1
The seeded workflows have distinct step slugs: the site boots and all integration tests pass on 0.6.1.
Demo settings
.env.examplesetsSQLITE_SYNCHRONOUS=NORMAL(how the demo runs) and, with the README, says what that trades away. The code's default staysFULL. The repository holds no deployment config, so the live deployment's environment has to get the variable by hand.retries: 0): a test that fails once is reported as failed.Tests
🤖 Generated with Claude Code
https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU