handleReturnToApp

Handles the return from the PayPal authentication flow and tokenizes the result.

Call this method on onResume after the user completes the PayPal authentication and is returned to app.

If the Activity used to launch the PayPal flow has is configured with android:launchMode="singleTop", this method should be invoked in the onNewIntent method of the Activity.

This method:

  1. Extracts the authentication result from the intent

  2. Tokenizes the successful authentication

  3. Returns the final PayPal result via the callback

Parameters

pendingRequest

the PayPalPendingRequest.Started stored after successfully invoking PayPalLauncher.launch

intent

the intent to return to merchant's application containing a deep link result from the PayPal browser flow

callback

callback to receive the final PayPal result (success, cancel, or failure)