Skip to content

feat: support external CardView submission - #1201

Open
PrinceD96 wants to merge 3 commits into
Adyen:developfrom
PrinceD96:daniel/external-card-submit
Open

feat: support external CardView submission#1201
PrinceD96 wants to merge 3 commits into
Adyen:developfrom
PrinceD96:daniel/external-card-submit

Conversation

@PrinceD96

@PrinceD96 PrinceD96 commented Jul 26, 2026

Copy link
Copy Markdown

Summary

  • add card.showSubmitButton for iOS and Android while preserving the existing default
  • expose CardViewHandle.submit(): void for merchant-owned CTAs, matching Adyen Web's imperative submit pattern
  • keep embedded cards mounted and retryable after hide(false)
  • dispatch Android submit and retry operations to the main thread
  • document the public API and external-submit flow

Testing

  • yarn typecheck
  • yarn test --runInBand (27 suites, 272 tests)
  • Android testDebugUnitTest (96 tests)
  • Android ktlint
  • API Extractor validation
  • Swift syntax parsing for the changed iOS source and test files
  • changed TypeScript files pass ESLint; the full lint command is blocked by two existing Prettier errors in untouched ApplePayConfiguration.ts (and locally generated Android test reports match its broad glob)

No simulator or emulator was used.

Closes #1200

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for external submission of the CardView component in the Adyen React Native SDK. It adds a showSubmitButton configuration option to hide the native submit button, exposes a submit() method via a CardViewHandle ref, and implements the native bridging logic on both Android and iOS. The review feedback highlights two critical issues: a thread-safety concern in Android's CardComponentManager where UI-bound components are interacted with on a background thread instead of the Main thread, and a potential infinite render loop in React Native's CardView due to onReadyChange being used as a dependency in useEffect.

Comment thread src/components/CardView.tsx Outdated
@PrinceD96
PrinceD96 marked this pull request as ready for review July 26, 2026 14:25
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.

Support external submission for embedded CardView

1 participant