Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One time checkout app switch changes #1257

Open
wants to merge 2 commits into
base: app-switch-checkout-feature
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down
Loading