Skip to content

Route Embedded saved payment method selection through a handler - #14393

Draft
cttsai-stripe wants to merge 3 commits into
masterfrom
cttsai/embedded-saved-method-selection-handler
Draft

Route Embedded saved payment method selection through a handler#14393
cttsai-stripe wants to merge 3 commits into
masterfrom
cttsai/embedded-saved-method-selection-handler

Conversation

@cttsai-stripe

Copy link
Copy Markdown
Contributor

Summary

Embedded saved payment method selection still commits the selection immediately before invoking the existing row-selection callback.

This PR moves that sequence behind an internal, select-only EmbeddedSavedPaymentMethodSelectionHandler. The Embedded vertical-layout factory delegates saved method selection to the handler, while callers without a handler retain the existing direct selection path.

What changed

  • Added the internal saved payment method selection handler.
  • Bound its default implementation in the standard Embedded and Checkout component graphs.
  • Routed the production Embedded vertical-layout factory through the handler.
  • Added a required nullable handler callback to the shared vertical-layout interactor.

What stays the same

  • The default handler commits the selection before invoking the callback.
  • PaymentSheet and sheet-based callers continue to update selection and invoke the callback directly.
  • This PR adds no pending state, error state, spinner UI, or Checkout controller behavior.
  • No public API changes are introduced.

Motivation

Checkout needs to perform work before completing saved payment method selection. Establishing the routing boundary separately keeps the behavior change in #14340 focused while preserving existing Embedded behavior here.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Coverage verifies that the default handler commits before invoking the callback, that the interactor delegates without duplicating the update or callback, and that the existing fallback behavior remains unchanged.

Focused handler and interactor tests passed. The path-aware pre-push hook passed :paymentsheet:apiCheck and :paymentsheet:detekt.

CI: pending.

Screenshots

Not applicable. This routing refactor has no UI changes.

Committed and created by Codex.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@cttsai-stripe
cttsai-stripe force-pushed the cttsai/embedded-saved-method-selection-handler branch from 0ec1832 to d94ed8f Compare September 4, 2026 18:40
cttsai-stripe and others added 2 commits September 4, 2026 12:23
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant