diff --git a/PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalInternalClient.kt b/PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalInternalClient.kt index afd4c99704..af155403a1 100644 --- a/PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalInternalClient.kt +++ b/PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalInternalClient.kt @@ -134,7 +134,7 @@ internal class PayPalInternalClient( if (!pairingId.isNullOrEmpty()) { paymentAuthRequest.approvalUrl = createAppSwitchUri(parsedRedirectUri).toString() } else { - callback.onResult(null, BraintreeException("Missing BA Token for PayPal App Switch.")) + callback.onResult(null, BraintreeException("Missing Token for PayPal App Switch.")) } } else { paymentAuthRequest.approvalUrl = parsedRedirectUri.toString() @@ -154,10 +154,7 @@ internal class PayPalInternalClient( .build() } - fun isAppSwitchEnabled(payPalRequest: PayPalRequest): Boolean { - return (payPalRequest is PayPalVaultRequest) && - payPalRequest.enablePayPalAppSwitch - } + fun isAppSwitchEnabled(payPalRequest: PayPalRequest) = payPalRequest.enablePayPalAppSwitch fun isPayPalInstalled(context: Context): Boolean { return deviceInspector.isPayPalInstalled(context)