Skip to content

Add base url prefix to Frames SDK for multi-region#552

Merged
ehab-al-cko merged 8 commits intomainfrom
feature/multi-region
Mar 6, 2026
Merged

Add base url prefix to Frames SDK for multi-region#552
ehab-al-cko merged 8 commits intomainfrom
feature/multi-region

Conversation

@ehab-al-cko
Copy link
Contributor

@ehab-al-cko ehab-al-cko commented Mar 5, 2026

Issue

PIMOB-4370

Proposed changes

Adds support for an optional baseURLPrefix to enable multi-region API routing by constructing prefixed API hosts (e.g. msdd.api.checkout.com) and plumbing that option through Frames UI components down into the core Checkout networking layer.

Changes:

Introduces baseURLPrefix into Frames configuration/models and forwards it into CheckoutAPIService.
Adds EnvironmentURLProvider to build prefixed base URLs (with trimming + fallback behavior) and updates request building to use it.
Updates Risk SDK dependency/imports to RiskSDK (and updates resolved package versions accordingly).

Copy link

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

Adds support for an optional baseURLPrefix to enable multi-region API routing by constructing prefixed API hosts (e.g. msdd.api.checkout.com) and plumbing that option through Frames UI components down into the core Checkout networking layer.

Changes:

  • Introduces baseURLPrefix into Frames configuration/models and forwards it into CheckoutAPIService.
  • Adds EnvironmentURLProvider to build prefixed base URLs (with trimming + fallback behavior) and updates request building to use it.
  • Updates Risk SDK dependency/imports to RiskSDK (and updates resolved package versions accordingly).

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/Mocks/StubCheckoutAPIService.swift Updates mock initializer signature to match new API surface.
Source/UI/SecurityCodeComponent/SecurityCodeComponentConfiguration.swift Adds baseURLPrefix to Security Code component configuration and documents behavior.
Source/UI/SecurityCodeComponent/SecurityCodeComponent.swift Passes baseURLPrefix into CheckoutAPIService creation.
Source/UI/PaymentForm/Model/PaymentFormConfiguration.swift Adds baseURLPrefix to payment form configuration and forwards it for API calls.
Source/UI/PaymentForm/Factory/PaymentFormFactory.swift Wires baseURLPrefix into CheckoutAPIService for payment form flows.
Source/Core/CheckoutAPIService.swift Extends Frames-layer CheckoutAPIService initializer/protocol to accept baseURLPrefix.
Package.swift Bumps checkout-risk-sdk-ios dependency version.
Package.resolved Updates locked revisions/versions for Risk SDK (and related resolved packages).
CheckoutTests/Stubs/StubRisk.swift Updates test import to RiskSDK.
CheckoutTests/Stubs/StubBaseURLProvider.swift Adjusts stub to conform to updated BaseURLProviding optional URL.
CheckoutTests/Model/EnvironmentTests.swift Adds unit tests for prefixed/trimmed base URL generation.
Checkout/Source/Tokenisation/CheckoutAPIService.swift Adds baseURLPrefix to initializer and uses EnvironmentURLProvider for request construction.
Checkout/Source/Network/RequestFactory.swift Updates URL creation to handle optional base URL provider output.
Checkout/Source/Model/Environment.swift Adds EnvironmentURLProvider and host-building logic for prefixed base URLs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ehab-al-cko ehab-al-cko force-pushed the feature/multi-region branch from 5702d15 to 62a508f Compare March 5, 2026 14:00
@ehab-al-cko ehab-al-cko self-assigned this Mar 5, 2026
@ehab-al-cko ehab-al-cko marked this pull request as ready for review March 5, 2026 14:00
ali-farhadi-cko
ali-farhadi-cko previously approved these changes Mar 5, 2026
@ehab-al-cko ehab-al-cko force-pushed the feature/multi-region branch from 23f998e to 103dcc1 Compare March 6, 2026 10:09
ali-farhadi-cko
ali-farhadi-cko previously approved these changes Mar 6, 2026
@ehab-al-cko ehab-al-cko force-pushed the feature/multi-region branch from 2e58ed6 to 40976a9 Compare March 6, 2026 10:46
ali-farhadi-cko
ali-farhadi-cko previously approved these changes Mar 6, 2026
@ehab-al-cko ehab-al-cko merged commit a451fe1 into main Mar 6, 2026
5 checks passed
@ehab-al-cko ehab-al-cko deleted the feature/multi-region branch March 6, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants