Skip to content

feat(components): route web-redirect categories + shared provider plumbing (ORC-6514)#386

Closed
OnurVar wants to merge 1 commit into
ov/feat/ORC-6513-native-ui-paymentsfrom
ov/feat/ORC-6514-foundational
Closed

feat(components): route web-redirect categories + shared provider plumbing (ORC-6514)#386
OnurVar wants to merge 1 commit into
ov/feat/ORC-6513-native-ui-paymentsfrom
ov/feat/ORC-6514-foundational

Conversation

@OnurVar

@OnurVar OnurVar commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Foundational cleanup of the deferred #376-review items — no new payment methods. This is the "verify" PR in the APM-unification stack (after Google Pay #376, Apple Pay #374, PayPal #385). It hardens how the prebuilt method list routes a tapped method and stops a native-UI failure from stranding the shopper.

The original ORC-6514 bank/QR/raw-data provider plumbing is not here — it moves into the PRs that actually consume it (#387 banks, #389 forms, #390 QR). On the reset stack those screens don't exist yet, so building the plumbing now would be dead code routing nowhere.

What changed

  • Stuck native-UI screen — when a native-UI start() rejects (e.g. an unavailable method the SDK still lists), MethodSelectionScreen used to swallow the error and leave the shopper on the processing spinner with no way back. It now navigates to the error screen.
  • One routing classifierMethodSelectionScreen routes through the shared routeMethodSelection (the same map usePrimerPaymentMethod uses), with an exhaustiveness check. A new kind can no longer be wired into the hook and silently missed by the screen.
  • Typed category paramrouteMethodSelection(type, categories) takes PrimerPaymentMethodManagerCategoryName[] instead of string[].
  • Union stays flat — the usePrimerPaymentMethod return union keeps three distinct variants with no shared base. They genuinely diverge (unsupported is isAvailable only; card has no outcome/cancel; nativeUi has both plus cancel), so a base would force optional fields and weaken the discriminated union. Revisit only if it fragments at 6+ variants.

Routing behavior is otherwise unchanged — PAYMENT_CARD and other RAW_DATA methods still open the card form (the non-card RAW_DATA split lands in #389).

Not a breaking change

Internal only — no public hook, component, or type is added, removed, or changed.

Base

ov/feat/ORC-6513-native-ui-payments (#385).

Jira

ORC-6514

Test plan

  • yarn typecheck / yarn lint — clean
  • yarn jest — green bar the known tr_TR localization flake; new routeMethodSelection.test.ts
  • Manual iOS — PayPal (native-UI) and card both route and complete as before (routing-consolidation is behavior-preserving)
  • Stuck-screen fix is a defensive catch on the start()-reject path; not reproducible in the sandbox (no unavailable native-UI method is listed there)

@OnurVar OnurVar requested a review from a team as a code owner June 17, 2026 21:46
@github-actions

Copy link
Copy Markdown
Warnings
⚠️ This PR doesn't seem to contain any updated Unit Test for Swift 🤔. Please consider double checking it 🙏
Messages
📖 ✅ No SwiftLint violations found.

Generated by 🚫 Danger Swift against 01d6bca

@github-actions

Copy link
Copy Markdown
Fails
🚫

🙁 Found 1 ESLint violations.

🚫

src/Components/hooks/useCardNetworkDescriptor.ts#L18 - ** ESLint **: Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the void operator. - (@typescript-eslint/no-floating-promises)

Warnings
⚠️ Please assign someone aside from CODEOWNERS (@checkout-pci-reviewers) to review this PR.

Generated by 🚫 dangerJS against 01d6bca

@github-actions

Copy link
Copy Markdown
Warnings
⚠️ This PR doesn't seem to contain any updated Unit Test for Kotlin 🤔. Please consider double checking it 🙏
Messages
📖 ✅ No detekt violations found.

Generated by 🚫 Danger Kotlin against 01d6bca

@unblocked unblocked Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues found

About Unblocked

Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.

📖 Documentation — Learn more in our docs.

💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions.

👍 Give feedback — React to comments with 👍 or 👎 to help us improve.

⚙️ Customize — Adjust settings in your preferences.

@OnurVar OnurVar marked this pull request as draft June 17, 2026 21:54
@OnurVar OnurVar self-assigned this Jun 17, 2026
@OnurVar OnurVar force-pushed the ov/feat/ORC-6513-native-ui-payments branch from bad5150 to 92f5e9c Compare June 23, 2026 11:30
…ssifier (ORC-6514)

Show the error screen on a native-UI start reject instead of swallowing it.
@OnurVar

OnurVar commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the consolidated APM-unification stack — #392 (native-UI) → #393 (bank) → #394 (raw-data) → #395 (QR) → #396 (Klarna). Closing in favor of those; the new stack carries the same work plus the review fixes.

@OnurVar OnurVar closed this Jun 25, 2026
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.

1 participant