Skip to content

Conversation

@cannarocks
Copy link
Member

Introduce payment processing capabilities and improve the handling of plan statuses, including the addition of a purchasable state. Update relevant components to reflect these changes and ensure proper status retrieval.

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

Introduces comprehensive payment processing capabilities including a new purchasable plan state, payment flow handling, and UI components for checkout functionality. Enhances the plan status system to support payment-related states and refactors status handling across the application.

  • Add payment processing with Stripe integration including checkout and webhook endpoints
  • Introduce purchasable plan state with conditional UI rendering based on payment availability
  • Refactor plan status handling to use a consistent parameter-based approach across components

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/pages/Plan/summary/index.tsx Adds payment failure handling and conditional rendering for purchasable plans
src/pages/Plan/summary/components/PaymentLoader.tsx New loading modal component for payment processing states
src/pages/Plan/summary/components/IntroductionCard.tsx Adds hardcoded UI for purchasable plan state
src/pages/Plan/summary/components/DetailsCard.tsx Integrates buy button for purchasable plans and updates status handling
src/pages/Plan/summary/components/BuyButton.tsx New component handling checkout flow and payment initiation
src/pages/Plan/summary/components/ActivityInfo.tsx Updates interface to support purchasable property
src/pages/Plan/navigation/header/Header.tsx Updates plan status function call signature
src/pages/Plan/index.tsx Adds payment success handling with placeholder alert
src/pages/Plan/hooks/usePlan.ts Extends plan object with purchasable state based on checkout item availability
src/pages/Plan/context/planContext.tsx Adds payment progress state and checkout item management
src/pages/Plan/Controls/index.tsx Updates plan status function call signature
src/pages/Plan/Controls/SaveConfigurationButton.tsx Updates plan status function call signature
src/pages/Plan/Controls/ConfirmPlanButton.tsx Adds buy button for purchasable plans
src/pages/Dashboard/project-items/Plans.tsx Updates plan status function calls
src/pages/Dashboard/SuggestedCampaigns.tsx Updates plan status function calls
src/pages/Dashboard/hooks/getPlanStatus.ts Refactors to use parameter object and adds paying status
src/locales/it/translation.json Adds empty translation key for paying status
src/locales/en/translation.json Adds translation for paying status and payment modal
src/features/api/index.ts Adds new API endpoints for checkout and payment processing
src/common/schema.ts Updates API schema with new payment endpoints and types
package.json Updates design system dependency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

This comment was marked as outdated.

@Kariamos Kariamos marked this pull request as ready for review August 25, 2025 15:53
@cannarocks cannarocks marked this pull request as draft August 25, 2025 16:07
@Kariamos Kariamos marked this pull request as ready for review August 26, 2025 09:42
@cannarocks cannarocks force-pushed the test-purchasable-plans branch from 104a33a to 17a5575 Compare August 26, 2025 09:57
fix: update plan status handling and improve payment status translations

fix: correct URL paths for payment success and failure redirection

fix: add translations for purchasable plan introduction card

feat: add checkout endpoint and update plan status type
@cannarocks cannarocks force-pushed the test-purchasable-plans branch from 17a5575 to 7cb79b9 Compare August 26, 2025 09:58
@cannarocks cannarocks added the enhancement New feature or request label Aug 26, 2025
@Kariamos Kariamos requested a review from Copilot August 26, 2025 10:02
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 PR introduces payment processing capabilities and enhances plan status handling by adding a purchasable state for plans. The changes enable users to purchase plans directly through a checkout process while improving the overall plan status management system.

Key changes:

  • Added payment processing features with checkout functionality and payment status tracking
  • Enhanced plan status handling to include a new 'paying' status and purchasable plan detection
  • Updated UI components to conditionally render payment-related elements based on plan purchasability

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/pages/Plan/summary/index.tsx Added payment failure handling and conditional rendering of confirmation card based on plan purchasability
src/pages/Plan/summary/components/PaymentLoader.tsx New component for displaying payment processing modal with loading indicator
src/pages/Plan/summary/components/IntroductionCard.tsx Added conditional rendering for purchasable plans with specific messaging
src/pages/Plan/summary/components/DetailsCard.tsx Updated to use new getPlanStatus API and conditionally render buy button for purchasable plans
src/pages/Plan/summary/components/BuyButton.tsx New component implementing checkout functionality with payment processing
src/pages/Plan/summary/components/ActivityInfo.tsx Extended plan interface to support isPurchasable property
src/pages/Plan/navigation/header/Header.tsx Updated to use refactored getPlanStatus function
src/pages/Plan/index.tsx Added payment success handling with URL cleanup
src/pages/Plan/hooks/usePlan.ts Enhanced to fetch checkout item data and determine plan purchasability
src/pages/Plan/context/planContext.tsx Added payment progress state and checkout item management
src/pages/Plan/Controls/*.tsx Updated to use refactored getPlanStatus function signature
src/pages/Dashboard/project-items/Plans.tsx Updated to use refactored getPlanStatus function
src/pages/Dashboard/hooks/getPlanStatus.ts Refactored to accept object parameter and added 'paying' status support
src/pages/Dashboard/SuggestedCampaigns.tsx Updated to use refactored getPlanStatus function
src/locales/*/translation.json Added new translation keys for payment-related UI elements
src/features/api/index.ts Added new API endpoints for checkout and buy functionality
src/common/schema.ts Updated API schema to include new payment endpoints and plan status
package.json Updated design system dependency version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cannarocks cannarocks merged commit 9be1b42 into develop Sep 1, 2025
12 checks passed
@cannarocks cannarocks deleted the test-purchasable-plans branch September 1, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants