Skip to content

refactor checkout#30

Merged
benhalverson merged 2 commits intomainfrom
refactor-checkout
Dec 10, 2025
Merged

refactor checkout#30
benhalverson merged 2 commits intomainfrom
refactor-checkout

Conversation

@benhalverson
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 10, 2025 08:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the checkout flow to improve security by passing the Stripe clientSecret via React Router's in-memory state instead of URL query parameters. This prevents sensitive payment data from being exposed in browser history, server logs, and referrer headers.

Key changes:

  • Updated Checkout.tsx to pass clientSecret via navigation state instead of URL parameters
  • Modified Payment.tsx to prioritize router state for clientSecret while maintaining backward compatibility with URL query parameters

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/pages/Checkout.tsx Changed navigation to pass clientSecret via state object; added debug console.log (should be removed)
src/pages/Payment.tsx Added logic to read clientSecret from router state with fallback to query parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 10, 2025 08:48
@benhalverson benhalverson merged commit 26404b6 into main Dec 10, 2025
3 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments