-
-
Notifications
You must be signed in to change notification settings - Fork 34
feat(purchase): support legacy subscription refund #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(purchase): support legacy subscription refund #248
Conversation
refund
|
Hello @imdhemy, I would appreciate it if you could review my humble RP. |
There was a problem hiding this 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 the last remaining legacy purchase subscription method - refund - completing the implementation of all legacy subscription methods. It also includes a beneficial refactoring that extracts repeated HTTP headers into a constant.
Key changes:
- Added
legacyRefund()method to handle subscription refunds via the legacy Google Play API endpoint - Extracted common HTTP headers into a
HEADERSconstant to reduce code duplication - Renamed test methods to remove redundant "_subscription" suffix for better consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Domain/Purchase/SubscriptionService.php | Implements legacyRefund() method with proper endpoint configuration and refactors all HTTP requests to use a shared HEADERS constant |
| tests/Domain/Purchase/SubscriptionServiceTest.php | Adds comprehensive test coverage for legacyRefund() and renames existing test methods to match service method names more closely |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
refund
imdhemy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EmanFateen Thank you!
In this MR, I've introduced the legacy purchases subscriptions
refundmethod - the last legacy method -Key changes:
legacyRefund()method has been added toSubscriptionServicelegacy_refund()test case has been added toSubscriptionServiceTest