Skip to content

Conversation

@brobro10000
Copy link
Collaborator

This pull request updates the checkout stepper loader logic to improve how we verify and fetch the current checkout intent and related data. The changes ensure users are redirected appropriately if the checkout intent is missing or incomplete, and additional queries are run for more robust state validation.

Key improvements to checkout intent validation and data fetching:

  • Added additional queries to fetch both success state (queryBffSuccess) and intent details (queryCheckoutIntent) when a checkout intent exists, ensuring the loader has the latest and most accurate data. [1] [2]
  • Improved the redirect logic: now, if there is no checkoutIntent or if the intent is not in a successful state (either missing the existingSuccessfulCheckoutIntent flag or the status type is not 'complete'), the user is redirected to the Plan Details page to restart the process. This makes the flow more robust and prevents users from proceeding with incomplete or invalid checkout sessions.

@brobro10000 brobro10000 marked this pull request as ready for review October 10, 2025 15:55
Copilot AI review requested due to automatic review settings October 10, 2025 15:55
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 improves the checkout stepper loader's validation logic to ensure users have valid checkout sessions before accessing success pages. The changes add more robust data fetching and redirect logic to prevent incomplete checkout flows.

  • Enhanced data fetching by adding queries for success state and checkout intent details
  • Improved redirect logic to check both checkout intent existence and completion status
  • Added explicit validation to ensure checkout intents are in successful states

Tip: Customize your code reviews with copilot-instructions.md. Create the file or 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.

3 participants