Skip to content

Conversation

@EmanFateen
Copy link
Contributor

@EmanFateen EmanFateen commented Dec 9, 2025

Q A
Tickets Fix #247
License MIT

In this MR, I've introduced the legacy purchases subscriptions refund method - the last legacy method -

Key changes:

  1. legacyRefund() method has been added to SubscriptionService
  2. legacy_refund() test case has been added to SubscriptionServiceTest

@EmanFateen EmanFateen changed the title [legacy:subscription]: Support legacy refund subscription [legacy:subscription]: Support legacy purchases subscriptions refund Dec 9, 2025
@EmanFateen
Copy link
Contributor Author

Hello @imdhemy, I would appreciate it if you could review my humble RP.
Thank you.

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 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 HEADERS constant 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.

@imdhemy imdhemy added the Feature Add a new feature label Dec 9, 2025
@imdhemy imdhemy changed the title [legacy:subscription]: Support legacy purchases subscriptions refund feat(purchase): support legacy subscription refund Dec 9, 2025
Copy link
Owner

@imdhemy imdhemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EmanFateen Thank you!

@imdhemy imdhemy merged commit 29be0f9 into imdhemy:1.x Dec 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Add a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[legacy:purchase]support refund subscription purchase

2 participants