-
Notifications
You must be signed in to change notification settings - Fork 246
Description
Braintree SDK Version
v5.17.0
Environment
Sandbox
Android Version & Device
Redmi Note 11 5G - Android 13
Braintree dependencies
implementation 'com.braintreepayments.api:paypal:5.17.0'
Describe the bug
In certain mobile browsers that do not support Android App Links, users are unable to return to the application after completing or canceling a PayPal authorization. Instead, they remain stuck in the browser.
This behavior appears to be an issue specific to v5 of the SDK. In v4, the deepLinkFallbackUrlScheme effectively allowed users to return to the app. However, with v5 now enforcing the use of App Links, the SDK does not seem to adequately handle scenarios where App Links are unsupported by the user's browser.
Specifically, when the PayPal flow is initiated from a browser and uses an appLinkReturnUrl, there appears to be no preliminary check for App Link functionality. Consequently, the deepLinkFallbackUrlScheme also fails to trigger, preventing the user from being redirected back to the native application.
To reproduce
-
Initiate PayPal flow via Braintree SDK, which opens the PayPal login/authorization page in a mobile web browser.
-
Within the PayPal web interface, after logging in and reviewing details, click the "Continue to Review Order" button (or a similar confirmation/proceed button).
-
Observe that after this action, the user is not redirected back to the app. Instead, they remain on a PayPal confirmation page or a generic web page within the browser.
Expected behavior
Expected Behavior: Use deepLinkFallbackUrlScheme to return to the App if applink fails.
If App Links are unavailable or unsupported by the browser, the SDK should default to using the deepLinkFallbackUrlScheme to ensure the user is redirected back to the native app, rather than remaining in the browser.
Screenshots
No response