Skip to content
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

iTunes baseUri manipulation for test purposes #181

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

aliozkan
Copy link
Contributor

@aliozkan aliozkan commented Mar 5, 2024

No description provided.

@Stafox
Copy link
Collaborator

Stafox commented Mar 5, 2024

Hi. What you trying to achieve with that change?
Why you won't to use setEndpoint() method for that?

@aliozkan
Copy link
Contributor Author

aliozkan commented Mar 6, 2024

setEndpoint() is checking if endpoint is production or sandbox, otherwise it throws InvalidArgumentException:

public function setEndpoint(string $endpoint): self
    {
        if ($endpoint !== self::ENDPOINT_PRODUCTION && $endpoint !== self::ENDPOINT_SANDBOX) {
            throw new InvalidArgumentException("Invalid endpoint '{$endpoint}'");
        }
        $this->endpoint = $endpoint;

        return $this;
    }

@Stafox
Copy link
Collaborator

Stafox commented Mar 6, 2024

Correct. What endpoint you want to specify beside prod/sandbox?

@aliozkan
Copy link
Contributor Author

aliozkan commented Mar 6, 2024

Custom endpoint that simulates Apple /verifyReceipt endpoint. Returns success/error response based on receipt-data input. We can run integration tests with our specific receipt-data and get success/error response without any client involved.

@Stafox Stafox merged commit c188c1b into aporat:master Mar 6, 2024
9 checks passed
@Stafox
Copy link
Collaborator

Stafox commented Mar 6, 2024

Available in 4.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants