Skip to content

Feature Terminal API regional endpoint configuration - #936

Open
ashwaniarya-adyen wants to merge 6 commits into
mainfrom
fix/terminal-api-region-configuration
Open

Feature Terminal API regional endpoint configuration#936
ashwaniarya-adyen wants to merge 6 commits into
mainfrom
fix/terminal-api-region-configuration

Conversation

@ashwaniarya-adyen

@ashwaniarya-adyen ashwaniarya-adyen commented Sep 2, 2026

Copy link
Copy Markdown

Description

  • Adds Client::setTerminalApiRegion() and ensures the resolved regional endpoint is written to endpointTerminalCloud, which is used by /sync, /async, and
  • The change preserves terminalApiCloudEndpoint for compatibility, supports valid legacy region configuration, gives terminalApiRegion priority, and throws
    AdyenException for unsupported regions.

Tested scenarios
- Regional Terminal API URLs for sync, async, and connected terminals.
- Region set before or after live environment configuration.
- Default live and test endpoints.
- Invalid regions and legacy region compatibility.

PHP Library - Support Region in Terminal API

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors how the Terminal API region and cloud endpoints are configured in the Adyen PHP client. It introduces a new setTerminalApiRegion method in the Client class, updates PosPayment to utilize this method, and adds comprehensive unit tests to verify the behavior. The review feedback suggests improving code quality and type safety by adding a : void return type declaration, using strict comparisons, and reusing local configuration variables.

Comment thread src/Adyen/Client.php Outdated
Comment thread src/Adyen/Service/PosPayment.php Outdated
@ashwaniarya-adyen ashwaniarya-adyen self-assigned this Sep 2, 2026
@ashwaniarya-adyen ashwaniarya-adyen changed the title Fix Terminal API regional endpoint configuration Feature Terminal API regional endpoint configuration Sep 2, 2026
@ashwaniarya-adyen
ashwaniarya-adyen marked this pull request as ready for review September 2, 2026 07:54
@ashwaniarya-adyen
ashwaniarya-adyen requested a review from a team as a code owner September 2, 2026 07:54
Comment thread tests/Unit/RegionTest.php
gcatanese
gcatanese previously approved these changes Sep 3, 2026

@gcatanese gcatanese left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

Comment thread src/Adyen/Client.php Outdated
Comment thread tests/Unit/RegionTest.php
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants