Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Conversation

@FunixG
Copy link
Member

@FunixG FunixG commented Mar 14, 2025

closes #102

@FunixG FunixG requested a review from Copilot March 14, 2025 16:21
Copy link

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 adds support for recurring subscriptions with Paypal by introducing new client interfaces, DTOs, and a stubbed service implementation. Key changes include:

  • Addition of REST client interfaces for Paypal subscriptions and plans.
  • Introduction of DTOs for creating and representing Paypal subscriptions and plans.
  • A stubbed implementation of the Paypal plan service.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/clients/PaypalSubscriptionClient.java Defines endpoints for managing Paypal subscriptions.
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/clients/PaypalPlanFeignClient.java Configures a Feign client for Paypal plans.
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/clients/PaypalSubscriptionFeignClient.java Configures a Feign client for Paypal subscriptions.
modules/payment/paypal/service/src/main/java/com/funixproductions/api/payment/paypal/service/subscriptions/services/PaypalPlanService.java Provides stubbed implementations of plan-related operations.
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/clients/PaypalPlanClient.java Defines endpoints for managing Paypal plans.
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/dtos/requests/paypal/PaypalCreateSubscriptionDTO.java DTO for creating Paypal subscriptions.
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/dtos/responses/PaypalPlanDTO.java DTO for representing Paypal plan details.
modules/payment/paypal/client/src/main/java/com/funixproductions/api/payment/paypal/client/dtos/responses/PaypalSubscriptionDTO.java DTO for representing Paypal subscription details.

@FunixG FunixG requested a review from Copilot March 14, 2025 16:29
Copy link

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 implements recurring PayPal subscriptions by introducing new client interfaces, Feign client integrations, and service stubs along with updated DTOs for handling subscription and plan data.

  • Added client interfaces for PayPal subscriptions and plans.
  • Introduced Feign client adapters for the subscription and plan endpoints.
  • Created a stub service implementation for PayPal plans and updated the related DTOs.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
PaypalSubscriptionClient.java Introduces endpoints for managing PayPal subscriptions.
PaypalPlanFeignClient.java Creates a Feign client to delegate plan functionality.
PaypalSubscriptionFeignClient.java Creates a Feign client to delegate subscription functionality.
PaypalPlanService.java Provides stub implementations for plan management methods.
PaypalPlanClient.java Defines REST endpoints for plan operations with appropriate validations.
PaypalCreateSubscriptionDTO.java Updates the DTO for subscription creation with required fields.
PaypalSubscriptionDTO.java Defines the response DTO for subscription data.
PaypalPlanDTO.java Defines the DTO for plan information with validation constraints.
Comments suppressed due to low confidence (1)

modules/payment/paypal/service/src/main/java/com/funixproductions/api/payment/paypal/service/subscriptions/services/PaypalPlanService.java:15

  • The method returns null as a placeholder which may lead to NullPointerExceptions when called. Consider throwing an UnsupportedOperationException or providing a temporary implementation that clearly indicates the method is not yet implemented.
return null;

@FunixG FunixG requested a review from Copilot March 14, 2025 18:49
@FunixG FunixG self-assigned this Mar 14, 2025
Copy link

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 adds support for recurring PayPal subscriptions by introducing new clients, resources, DTOs, and services to handle subscription, product, and plan management.

  • Introduces new Feign clients and interfaces for PayPal subscriptions, products, and plans.
  • Implements REST resource classes exposing endpoints to manage subscriptions and plans.
  • Adds DTOs for creating and responding to PayPal subscription and plan requests.

Reviewed Changes

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

Show a summary per file
File Description
PaypalServiceSubscriptionsClient.java New client interface for subscription endpoints.
PaypalServiceProductsClient.java New client interface for product endpoints.
PaypalSubscriptionClient.java Client interface defining subscription operations.
PaypalPlanFeignClient.java Feign client for plan operations.
PaypalServicePlansClient.java Service for handling PayPal plan operations.
PaypalSubscriptionResource.java Exposes REST endpoints for subscription management.
PaypalSubscriptionFeignClient.java Feign client for subscription endpoints.
PaypalPlanResource.java REST resource exposing plan-related endpoints.
PaypalPlanClient.java Interface for plan operations via REST calls.
PaypalSubscriptionResponse.java DTO for subscription responses with helper methods.
PaypalPlanService.java Service implementation for PayPal plans (stubbed).
PaypalPlanResponse.java Simple DTO for plan responses.
CreatePaypalSubscriptionRequest.java DTO for creating subscriptions, including inner classes.
CreatePaypalProductRequest.java DTO for creating PayPal products.
PaypalProductResponse.java DTO for product responses.
PaypalCreateSubscriptionDTO.java Client DTO for subscription creation requests.
PaypalSubscriptionDTO.java Client DTO representing a subscription.
PaypalPlanDTO.java Client DTO containing plan information and validations.
CreatePaypalPlanRequest.java DTO for creating PayPal plans with billing cycle details.
Comments suppressed due to low confidence (1)

modules/payment/paypal/service/src/main/java/com/funixproductions/api/payment/paypal/service/subscriptions/dtos/requests/CreatePaypalSubscriptionRequest.java:70

  • [nitpick] The familyName is hardcoded as '.', which might not be appropriate for a user's surname. Consider using a proper surname value or handling missing surname data more gracefully.
this.familyName = ".";

@FunixG FunixG requested a review from Copilot April 3, 2025 16:28
Copy link

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 implements recurring subscription functionality with PayPal by adding new client interfaces, DTOs, and configuration details needed for PayPal integration and webhook processing.

  • Introduces new Feign clients for PayPal products, plans, and subscriptions.
  • Adds webhook configuration parameters in both application and Kubernetes manifests.
  • Updates security and billing client configuration to support the new PayPal functionality.

Reviewed Changes

Copilot reviewed 46 out of 47 changed files in this pull request and generated no comments.

Show a summary per file
File Description
modules/payment/paypal/service/subscriptions/clients/PaypalServiceProductsClient.java New Feign client for PayPal products.
modules/payment/paypal/service/subscriptions/clients/PaypalServicePlansClient.java New Feign client for PayPal plans.
modules/payment/paypal/service/security/WebSecurity.java Updated security to permit all requests.
modules/payment/paypal/service/config/PaypalConfig.java Added webhookId field for PayPal webhooks.
modules/payment/paypal/service/FunixProductionsPaymentPaypalApp.java Added a new client package for user client integration.
modules/payment/paypal/client/dtos/responses/PaypalSubscriptionDTO.java Added DTO for PayPal subscription responses.
modules/payment/paypal/client/dtos/responses/PaypalPlanDTO.java Added DTO for PayPal plan responses, with custom equals and hashCode implementations.
modules/payment/paypal/client/dtos/requests/paypal/PaypalCreateSubscriptionDTO.java Added DTO for creating PayPal subscriptions.
modules/payment/paypal/client/clients/* New Feign clients to connect to the payment-paypal microservice.
modules/payment/billing/client/src/main/java/com/funixproductions/api/payment/billing/client/dtos/BillingDTO.java Updated billing DTO with additional constructors for Price.
Kubernetes manifests Added webhook configuration for PayPal in both production and dev environments.
Files not reviewed (1)
  • modules/payment/paypal/service/pom.xml: Language not supported
Comments suppressed due to low confidence (1)

modules/payment/paypal/client/dtos/responses/PaypalPlanDTO.java:89

  • The equals method requires both planId fields to be non-null for equality, which may incorrectly treat two objects with null planId as unequal. Consider updating the equality logic to handle cases where both planId values are null, ensuring a more robust comparison.
this.planId != null && other.planId != null && this.planId.equals(other.planId)

@FunixG FunixG marked this pull request as ready for review April 3, 2025 16:52
@FunixG FunixG merged commit aad6e28 into master Apr 3, 2025
2 checks passed
@FunixG FunixG deleted the feature/paypal-subscriptions branch April 3, 2025 16:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paypal API: Implémentation d'un abonnement

2 participants