invoke

operator fun invoke(merchantEnabledAppSwitch: Boolean, appSwitchFlowFromPayPalResponse: Boolean)

Sets the status of the app switch flow. This should be called once the PayPal response is received. Since it is the final check to see if the app switch flow should be shown.

App Switch Logic:

  1. Merchant enabled app switch

  2. PayPal app installed

  3. PayPal response indicates an app switch flow

Parameters

merchantEnabledAppSwitch

whether the merchant has enabled app switch in their request.

appSwitchFlowFromPayPalResponse

whether the PayPal response indicates an app switch flow.