[PIMOB-4287]: adding base url prefix to Frames SDK for multi-region#302
Merged
zane-smith-cko merged 13 commits intomasterfrom Mar 11, 2026
Merged
[PIMOB-4287]: adding base url prefix to Frames SDK for multi-region#302zane-smith-cko merged 13 commits intomasterfrom
zane-smith-cko merged 13 commits intomasterfrom
Conversation
…onfig, add updated public keys
…efix, add validator extension function
There was a problem hiding this comment.
Pull request overview
Adds support for an optional subdomain/base-URL prefix so tokenization requests can be routed via a regional/merchant-specific subdomain, and wires this through Frames + CVV flows with updated samples and tests.
Changes:
- Introduces
baseUrlPrefixin Frames configuration/DI and propagates it down toCheckoutApiServiceFactory. - Adds
Environment.toBaseUrl(...)URL building with prefix validation and corresponding unit tests. - Updates example apps and unit tests to pass the new prefix argument(s).
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| frames/src/test/java/com/checkout/frames/screen/paymentform/PaymentFormViewModelTest.kt | Updates test setup to include baseUrlPrefix when constructing the VM factory. |
| frames/src/test/java/com/checkout/frames/screen/paymentform/PaymentFormConfigTest.kt | Extends config test coverage to include baseUrlPrefix. |
| frames/src/test/java/com/checkout/frames/mock/PaymentFormConfigTestData.kt | Adds test data constant for baseUrlPrefix. |
| frames/src/test/java/com/checkout/frames/cvvinputfield/InternalCVVComponentApiTest.kt | Updates CVV API test to include baseUrlPrefix. |
| frames/src/test/java/com/checkout/frames/cvvinputfield/CVVComponentApiFactoryTest.kt | Updates factory test for new create(...) signature. |
| frames/src/main/java/com/checkout/frames/screen/paymentform/model/PaymentFormConfig.kt | Adds public config field baseUrlPrefix. |
| frames/src/main/java/com/checkout/frames/screen/paymentform/PaymentFormViewModel.kt | Threads baseUrlPrefix into injector creation. |
| frames/src/main/java/com/checkout/frames/screen/paymentform/PaymentFormScreen.kt | Passes config baseUrlPrefix into VM factory. |
| frames/src/main/java/com/checkout/frames/di/injector/FramesInjector.kt | Threads baseUrlPrefix into CheckoutApiServiceFactory.create(...) and DI builder. |
| frames/src/main/java/com/checkout/frames/di/component/FramesDIComponent.kt | Adds @BindsInstance baseUrlPrefix to Dagger builder. |
| frames/src/main/java/com/checkout/frames/cvvinputfield/api/InternalCVVComponentApi.kt | Threads baseUrlPrefix into CheckoutApiServiceFactory.create(...) for CVV tokenization. |
| frames/src/main/java/com/checkout/frames/cvvinputfield/CVVComponentApiFactory.kt | Extends CVV factory API to accept baseUrlPrefix. |
| example_app_frames/src/main/java/com/checkout/example/frames/ui/utils/Constants.kt | Adds demo constant for regional subdomain and updates demo keys. |
| example_app_frames/src/main/java/com/checkout/example/frames/ui/screen/MainActivity.kt | Passes regional subdomain into PaymentFormConfig. |
| example_app_frames/src/main/java/com/checkout/example/frames/ui/screen/HomeScreen.kt | Passes regional subdomain into CheckoutApiServiceFactory.create(...). |
| example_app_frames/src/main/java/com/checkout/example/frames/ui/screen/CVVTokenizationScreen.kt | Passes regional subdomain into CVVComponentApiFactory.create(...). |
| checkout/src/test/java/com/checkout/EnvironmentExtensionTest.kt | Adds unit tests for Environment.toBaseUrl(...) behavior. |
| checkout/src/test/java/com/checkout/CheckoutApiServiceFactoryTest.kt | Updates factory test for new signature. |
| checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt | Adds Environment.toBaseUrl(...) and prefix validation helper. |
| checkout/src/main/java/com/checkout/base/model/Environment.kt | Refactors Environment enum to remove url field. |
| checkout/src/main/java/com/checkout/CheckoutApiServiceFactory.kt | Adds baseUrlPrefix parameter and uses Environment.toBaseUrl(...) for tokenization base URL. |
| app/src/main/java/checkout/checkout_android/DemoActivity.java | Updates demo to pass regional subdomain into PaymentFormConfig. |
| app/src/main/java/checkout/checkout_android/Constants.java | Adds regional subdomain constant and updates demo keys. |
| app/src/main/java/checkout/checkout_android/CVVTokenizationActivity.java | Updates demo to pass regional subdomain into CVVComponentApiFactory.create(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
checkout/src/test/java/com/checkout/EnvironmentExtensionTest.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/CheckoutApiServiceFactory.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/CheckoutApiServiceFactory.kt
Outdated
Show resolved
Hide resolved
frames/src/main/java/com/checkout/frames/cvvinputfield/CVVComponentApiFactory.kt
Outdated
Show resolved
Hide resolved
frames/src/main/java/com/checkout/frames/cvvinputfield/CVVComponentApiFactory.kt
Outdated
Show resolved
Hide resolved
a274ee9 to
3dd091f
Compare
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/CheckoutApiServiceFactory.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
example_app_frames/src/main/java/com/checkout/example/frames/ui/screen/HomeScreen.kt
Outdated
Show resolved
Hide resolved
adrian-orlowski-cko
previously approved these changes
Mar 10, 2026
adrian-orlowski-cko
left a comment
There was a problem hiding this comment.
LGTM
Thank you for rotating the keys!
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Outdated
Show resolved
Hide resolved
frames/src/main/java/com/checkout/frames/cvvinputfield/CVVComponentApiFactory.kt
Outdated
Show resolved
Hide resolved
chintan-soni-cko
approved these changes
Mar 11, 2026
zane-smith-cko
commented
Mar 11, 2026
checkout/src/main/java/com/checkout/logging/utils/EnvironmentExtension.kt
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
PIMOB-4287
Proposed changes
Added
baseUrlPrefixas a parameter for Frames configurationTest Steps
Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Screen.Recording.2026-03-09.at.14.20.32.mov