PHPAY-64: wip(subscription): subscription with asaas#66
Merged
Conversation
Closed
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new subscription feature in the PHPay library by adding a Subscription resource along with interface, request validation, and corresponding gateway methods, and updates the documentation and configuration files to support the feature.
- Added documentation examples for managing subscriptions via the Asaas gateway.
- Updated roadmap and configuration files to reflect the new subscription feature.
- Improved clarity in subscription-related documentation.
Files not reviewed (13)
- .husky/pre-commit: Language not supported
- .vscode/settings.json: Language not supported
- examples/asaas/subscriptions.php: Language not supported
- phpstan.neon: Language not supported
- src/Contracts/GatewayInterface.php: Language not supported
- src/Gateways/Asaas/AsaasGateway.php: Language not supported
- src/Gateways/Asaas/Interface/AsaasGatewayInterface.php: Language not supported
- src/Gateways/Asaas/Resources/Subscription/Interface/SubscriptionInterface.php: Language not supported
- src/Gateways/Asaas/Resources/Subscription/Requests/StoreSubscriptionAsaasRequest.php: Language not supported
- src/Gateways/Asaas/Resources/Subscription/Subscription.php: Language not supported
- src/Gateways/Efi/EfiGateway.php: Language not supported
- src/PHPay.php: Language not supported
- tests/PHPayTest.php: Language not supported
Comments suppressed due to low confidence (1)
README.md:118
- [nitpick] The variable name $phpay in this subscription example could be misleading. Consider renaming it to $subscription to accurately reflect that it holds a subscription resource.
/**
* @var Subscription $phpay
*/
evandrosystems
approved these changes
Apr 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new subscription feature to the PHPay library, along with several other improvements and adjustments. The changes include adding functionality for managing subscriptions via the Asaas gateway, updating documentation, and modifying configuration files to align with the new features.
Subscription Feature Implementation:
Subscriptionresource class insrc/Gateways/Asaas/Resources/Subscription/Subscription.phpto handle subscription-related operations, including customer assignment and subscription creation.SubscriptionInterfaceinsrc/Gateways/Asaas/Resources/Subscription/Interface/SubscriptionInterface.phpto define the contract for subscription operations.StoreSubscriptionAsaasRequestclass insrc/Gateways/Asaas/Resources/Subscription/Requests/StoreSubscriptionAsaasRequest.phpfor validating subscription data before making API calls.AsaasGatewayandAsaasGatewayInterfaceto include asubscription()method for accessing the subscription resource. [1] [2]Documentation Updates:
README.mdfile with examples and details about the new subscription feature. [1] [2] [3]Configuration and Codebase Adjustments:
.husky/pre-commitfrom 9 to 7 for broader compatibility..vscode/settings.jsonto update editor preferences, including line height and font family. [1] [2]testsdirectory from thephpstan.neonpaths to exclude it from static analysis.Core Library Enhancements:
PHPayclass to support the new subscription feature by adding agateway()method for instantiation and asubscription()method for accessing the subscription resource. [1] [2]subscription()method to theEfiGatewayclass for consistency, though it is not yet implemented.