Skip to content

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

Merged
8 commits merged into
mainfrom
feature/multi-region
Mar 6, 2026
Merged

Add base url prefix to Frames SDK for multi-region#552
8 commits merged into
mainfrom
feature/multi-region

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost 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).

@ghost ghost requested a review from Copilot March 5, 2026 13:53
Copy link
Copy Markdown

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.

Comment thread Checkout/Source/Network/RequestFactory.swift
@ghost ghost force-pushed the feature/multi-region branch from 5702d15 to 62a508f Compare March 5, 2026 14:00
@ghost ghost self-assigned this Mar 5, 2026
@ghost ghost marked this pull request as ready for review March 5, 2026 14:00
Comment thread Checkout/Source/Model/Environment.swift
ali-farhadi-cko
ali-farhadi-cko previously approved these changes Mar 5, 2026
@ghost ghost force-pushed the feature/multi-region branch from 1ef3cbc to 23f998e Compare March 6, 2026 09:47
@ghost ghost 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
@ghost ghost force-pushed the feature/multi-region branch from b06386b to 2e58ed6 Compare March 6, 2026 10:43
@ghost ghost 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
@ghost ghost dismissed stale reviews from ali-farhadi-cko and tinashe-makuti-cko via 23410a0 March 6, 2026 11:12
@ghost ghost merged commit a451fe1 into main Mar 6, 2026
5 checks passed
@ghost ghost deleted the feature/multi-region branch March 6, 2026 11:48
This pull request was closed.
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.

3 participants