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.
Description
Add support for new-tab based app switch flows to preserve merchant client-side state during PayPal checkout.
Problem
Today, when
appSwitchWhenAvailable: trueis set and the PayPal app is not installed, the SDK performs a full-page redirect to web checkout. This clears the merchant page's client-side state, which is problematic for merchants who rely on that state.Solution
Introduce a new preferences object that allows merchants to configure app switch behavior:
Behavior
launchAppSwitchIn: 'newTab': Opens a loader in a new tab, deep-links to the PayPal app from there. If the app is not installed, web checkout renders in the new tab, preserving the merchant page state.launchAppSwitchIn: 'sameTab': Uses full-page redirect (existing/legacy behavior).Why are we making these changes? Include references to any related Jira tasks or GitHub Issues
Reproduction Steps (if applicable)
Screenshots (if applicable)
Dependent Changes (if applicable)
Groups who should review (if applicable)
❤️ Thank you!