public class DropInRequest
extends java.lang.Object
implements android.os.Parcelable
DropInActivity with specified options.| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<DropInRequest> |
CREATOR |
static java.lang.String |
EXTRA_CHECKOUT_REQUEST |
| Modifier | Constructor and Description |
|---|---|
|
DropInRequest() |
protected |
DropInRequest(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
DropInRequest |
amount(java.lang.String amount)
This method is optional.
|
DropInRequest |
androidPayAllowedCountriesForShipping(java.lang.String... countryCodes)
Deprecated.
This method is deprecated. Please use
GooglePaymentRequest#getShippingAddressRequirements() instead.
This method is optional. |
DropInRequest |
androidPayCart(Cart cart)
Deprecated.
This method is deprecated. Use
googlePaymentRequest(GooglePaymentRequest) instead.
This method is optional. |
DropInRequest |
androidPayPhoneNumberRequired(boolean phoneNumberRequired)
Deprecated.
This method is deprecated. Please use
GooglePaymentRequest#phoneNumberRequired(boolean) instead.
This method is optional. |
DropInRequest |
androidPayShippingAddressRequired(boolean shippingAddressRequired)
Deprecated.
This method is deprecated. Please use
GooglePaymentRequest#shippingAddressRequired(boolean) instead.
This method is optional. |
DropInRequest |
clientToken(java.lang.String clientToken)
Provide authorization allowing this client to communicate with Braintree.
|
DropInRequest |
collectDeviceData(boolean collectDeviceData)
This method is optional.
|
int |
describeContents() |
DropInRequest |
disableAndroidPay()
Disables Android Pay in Drop-in.
|
DropInRequest |
disableGooglePayment()
Disables Google Payment in Drop-in.
|
DropInRequest |
disablePayPal()
Disables PayPal in Drop-in.
|
DropInRequest |
disableVenmo()
Disables Venmo in Drop-in.
|
GooglePaymentRequest |
getGooglePaymentRequest() |
android.content.Intent |
getIntent(android.content.Context context)
Get an
Intent that can be used in Activity.startActivityForResult(Intent, int)
to launch DropInActivity and the Drop-in UI. |
DropInRequest |
googlePaymentRequest(GooglePaymentRequest request)
This method is optional.
|
boolean |
isAndroidPayEnabled() |
boolean |
isGooglePaymentEnabled() |
boolean |
isPayPalEnabled() |
boolean |
isVenmoEnabled() |
DropInRequest |
paypalAdditionalScopes(java.util.List<java.lang.String> additionalScopes)
Set additional scopes to request when a user is authorizing PayPal.
|
DropInRequest |
requestThreeDSecureVerification(boolean requestThreeDSecure)
If 3D Secure has been enabled in the control panel and an amount is specified in
amount(String), Drop-In will request a 3D Secure verification for
any new cards added by the user. |
DropInRequest |
tokenizationKey(java.lang.String tokenizationKey)
Provide authorization allowing this client to communicate with Braintree.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final java.lang.String EXTRA_CHECKOUT_REQUEST
public static final android.os.Parcelable.Creator<DropInRequest> CREATOR
public DropInRequest()
protected DropInRequest(android.os.Parcel in)
public DropInRequest clientToken(java.lang.String clientToken)
clientToken(String) or tokenizationKey(String) must be set or an
com.braintreepayments.api.exceptions.AuthenticationException will occur.clientToken - The client token to use for the request.public DropInRequest tokenizationKey(java.lang.String tokenizationKey)
clientToken(String) or tokenizationKey(String) must be set or an
com.braintreepayments.api.exceptions.AuthenticationException will occur.tokenizationKey - The tokenization key to use for the request.public DropInRequest amount(java.lang.String amount)
amount - Amount of the transaction.public DropInRequest collectDeviceData(boolean collectDeviceData)
collectDeviceData - true if Drop-in should collect and return device data for
fraud prevention.DataCollectorpublic DropInRequest googlePaymentRequest(GooglePaymentRequest request)
request - The Google Payment Request GooglePaymentRequest for the transaction.@Deprecated public DropInRequest androidPayCart(Cart cart)
googlePaymentRequest(GooglePaymentRequest) instead.
This method is optional.cart - The Android Pay Cart for the transaction.@Deprecated public DropInRequest androidPayShippingAddressRequired(boolean shippingAddressRequired)
GooglePaymentRequest#shippingAddressRequired(boolean) instead.
This method is optional.shippingAddressRequired - true if Android Pay requests should request a
shipping address from the user.@Deprecated public DropInRequest androidPayPhoneNumberRequired(boolean phoneNumberRequired)
GooglePaymentRequest#phoneNumberRequired(boolean) instead.
This method is optional.phoneNumberRequired - true if Android Pay requests should request a phone
number from the user.@Deprecated public DropInRequest androidPayAllowedCountriesForShipping(java.lang.String... countryCodes)
GooglePaymentRequest#getShippingAddressRequirements() instead.
This method is optional.countryCodes - countries to which shipping is supported.
Follows the ISO 3166-2 format (ex: "US", "CA", "JP")public DropInRequest disableAndroidPay()
public DropInRequest disableGooglePayment()
public DropInRequest paypalAdditionalScopes(java.util.List<java.lang.String> additionalScopes)
additionalScopes - A List of additional scopes.
Ex: PayPal.SCOPE_ADDRESS.
Acceptable scopes are defined in PayPal.public DropInRequest disablePayPal()
public DropInRequest disableVenmo()
public DropInRequest requestThreeDSecureVerification(boolean requestThreeDSecure)
amount(String), Drop-In will request a 3D Secure verification for
any new cards added by the user.requestThreeDSecure - true to request a 3D Secure verification as part of Drop-In,
false to not request a 3D Secure verification. Defaults to false.public android.content.Intent getIntent(android.content.Context context)
Intent that can be used in Activity.startActivityForResult(Intent, int)
to launch DropInActivity and the Drop-in UI.context - Intent containing all of the options set in DropInRequest.public boolean isAndroidPayEnabled()
public boolean isPayPalEnabled()
public boolean isVenmoEnabled()
public GooglePaymentRequest getGooglePaymentRequest()
public boolean isGooglePaymentEnabled()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable