Repository navigation
PIMOB: 5473 - Bump checkoutAndroidComponents to 2.8.0 and add msc+rm support - #17
Merged
adrian-orlowski-cko merged 3 commits intoOct 5, 2026
Conversation
…card configuration for MSC+RM * Update `checkoutAndroidComponents` version to 2.8.0 in `libs.versions.toml` * Add stored card configuration state, settings UI, and display mode extensions in the sample app * Update payment session request models and flow factory to support `stored_card` payment method configuration
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Stale Compose callbacks can reset settings, and asynchronous state reads can produce inconsistent session and component configurations.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Adds merchant-stored-card configuration to the sample checkout flow and upgrades Checkout Android Components to 2.8.0.
Changes:
- Adds stored-card session and component configuration.
- Adds stored-card settings UI and state.
- Updates the sample dependency and default customer email.
| File | Description |
|---|---|
sample/gradle/libs.versions.toml |
Upgrades components to 2.8.0. |
PaymentSessions.kt |
Adds stored-card request models. |
strings.xml |
Adds stored-card labels. |
SettingsScreen.kt |
Adds stored-card settings controls. |
StoredCardSettings.kt |
Defines stored-card UI state. |
Settings.kt |
Updates the default email. |
Constants.kt |
Exposes display-mode options. |
DemoScreen.kt |
Wires stored-card state into settings. |
MainViewModel.kt |
Builds stored-card component options. |
MainActivity.kt |
Connects stored-card state and updates. |
FlowComponent.kt |
Configures stored-card payment sessions. |
Extensions.kt |
Adds display-mode labels. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Snapshot StoredCardSettings once in MainViewModel.showFlowComponent so the session request and ComponentOption are configured from the same values even if the user edits settings during the suspending session creation. - Read the latest StoredCardSettings via rememberUpdatedState in the Customer ID field callback so typing no longer resets display mode, CVV, or scheme/type choices through a stale callback captured by SampleOutlineTextField. - Document the storedCardSettings @PARAM in createConfigurationFromSettings KDoc. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chintan-soni-cko
marked this pull request as ready for review
October 2, 2026 15:38
chintan-soni-cko
marked this pull request as draft
October 2, 2026 15:58
* Make `email` and `phone` fields optional in the `Customer` model * Set `explicitNulls = false` in the Kotlinx Json configuration * Add phone number field and an expandable "Payment Session Setup" section to the sample app settings UI * Update flow component and region presets to handle optional email and phone values
chintan-soni-cko
marked this pull request as ready for review
October 2, 2026 16:55
adrian-orlowski-cko
approved these changes
Oct 5, 2026
adrian-orlowski-cko
deleted the
feature/PIMOB-5473_update_2.8.0_sample_app_support_for_msc_rm
branch
October 5, 2026 07:52
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.


Bumps the sample app to
checkout-android-components2.8.0 and wires end-to-end support for Merchant Saved Card + Remember Me (MSC+RM) so the blended experience can be exercised from the sample app. Also reworks the session customer setup so identifiers (email/phone) are only sent when explicitly provided.Issue
PIMOB-5473
Proposed changes
Stored Card (MSC+RM)
checkoutAndroidComponents2.6.1 → 2.8.0.StoredCardSettingsstate, gated on a single source of truth:enabled = customerId.isNotBlank()(no separate toggle — presence of a Customer ID is what turns the feature on).stored_cardis added toenabled_payment_methodsandpayment_method_configuration.stored_card.customer_idis sent (new serializable wire models). Component config builds aStoredCardConfigurationintoComponentOption.Payment session customer setup
email/phoneare now nullable and only sent when non-blank;explicitNulls = falseomits unset keys from the request.1234567890) — no phone is sent unless provided.Test Steps
testing video
Checklist
Further comments
Stored card is gated on Customer ID presence rather than a dedicated toggle, since the session's
customer_idis the real driver for resolving saved cards. The customer email/phone rework makes it possible to validate the "no identifier" path, which previously always triggered Remember Me because a phone was hard-coded onto the session.