Skip to content

fix(payments-demo): 💄 show Buy now to guests instead of a sign-in link - #912

Merged
aXenDeveloper merged 1 commit into
canaryfrom
fix/payments-demo-buy-button
Oct 30, 2026
Merged

aXenDeveloper merged 1 commit into
canaryfrom
fix/payments-demo-buy-button

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

  • pnpm lint:fix was run before opening this PR and changed nothing beyond this diff.
  • No docs change needed: the payments guides don't mention the old "Sign in to buy" link.

Description

What?

On the payments demo shop page (/payments-demo), guests now see the same Buy now button as signed-in members instead of a "Sign in to buy" link.

  • A guest clicking Buy now goes to /login?returnTo=%2Fpayments-demo, so after signing in they land back on the shop. Core's login already sanitizes returnTo.
  • Signed-in members are unchanged: Buy now starts the checkout.
  • The button is disabled for everyone when no payment provider is configured. Before, a guest could follow the sign-in link to an item that can't be bought.
  • The now-unused shop.sign_in message is removed.

Changed files: plugins/payments-demo/src/pages/shop-page.tsx and plugins/payments-demo/src/locales/en.json.

Why?

One clear call to action for every visitor; signing in is a step of buying, not a separate link.

Verification

  • The plugin builds and type-checks against current canary; oxlint and oxfmt are clean.
  • Browser walkthrough on the dev server:
    • As a guest, Buy now opened /login?returnTo=%2Fpayments-demo.
    • Signing in returned to /payments-demo.
    • Buy now then reached the purchase page, which showed "Waiting for payment".
    • With no provider configured, the button was disabled.
    • No console errors.

Generated by Claude Code

Guests get the same Buy now button as members; it opens sign-in with
returnTo=/payments-demo so they come back to the shop. The button is
disabled for everyone when no payment provider is configured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CnAiFaNGAPcFw63CH3Yo77
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T17:55:28.231641Z b2e766d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the 🐞 Bug Something isn't working label Oct 30, 2026
@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit b2e766d.

@aXenDeveloper
aXenDeveloper merged commit 6d83635 into canary Oct 30, 2026
6 checks passed
@aXenDeveloper
aXenDeveloper deleted the fix/payments-demo-buy-button branch October 30, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants