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 |
allowVaultCardOverride(boolean customerCheckBoxEnabled) |
DropInRequest |
amount(java.lang.String amount)
Deprecated.
|
DropInRequest |
cardholderNameStatus(int fieldStatus)
Sets the Cardholder Name field status, which is how it will behave in
CardForm. |
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 |
disableCard()
Disables Card 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.
|
java.lang.String |
getAuthorization() |
int |
getCardholderNameStatus() |
boolean |
getDefaultVaultSetting() |
GooglePaymentRequest |
getGooglePaymentRequest() |
android.content.Intent |
getIntent(android.content.Context context)
Get an
Intent that can be used in androidx.appcompat.app.AppCompatActivity#startActivityForResult(Intent, int)
to launch DropInActivity and the Drop-in UI. |
PayPalRequest |
getPayPalRequest() |
ThreeDSecureRequest |
getThreeDSecureRequest() |
DropInRequest |
googlePaymentRequest(GooglePaymentRequest request)
This method is optional.
|
boolean |
isCardEnabled() |
boolean |
isGooglePaymentEnabled() |
boolean |
isPayPalEnabled() |
boolean |
isSaveCardCheckBoxShown() |
boolean |
isVenmoEnabled() |
DropInRequest |
maskCardNumber(boolean maskCardNumber) |
DropInRequest |
maskSecurityCode(boolean maskSecurityCode) |
DropInRequest |
paypalRequest(PayPalRequest request)
This method is optional.
|
DropInRequest |
requestThreeDSecureVerification(boolean requestThreeDSecure)
If 3D Secure has been enabled in the control panel and an amount is specified in
amount(String) or a ThreeDSecureRequest is provided,
Drop-In will request a 3D Secure verification for any new cards added by the user. |
DropInRequest |
threeDSecureRequest(ThreeDSecureRequest threeDSecureRequest)
This method is optional.
|
DropInRequest |
tokenizationKey(java.lang.String tokenizationKey)
Provide authorization allowing this client to communicate with Braintree.
|
DropInRequest |
vaultCard(boolean defaultValue) |
DropInRequest |
vaultManager(boolean vaultManager) |
DropInRequest |
vaultVenmo(boolean defaultValue) |
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.@Deprecated public DropInRequest amount(java.lang.String amount)
ThreeDSecureRequest#amount(String)
This method is optional. Amount is only used for 3D Secure verifications.
This value must be a non-negative number and must match the currency format of the merchant account.
It can only contain numbers and optionally one decimal point with exactly 2 decimal place precision (e.g., x.xx).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.public DropInRequest paypalRequest(PayPalRequest request)
request - The PayPal Request PayPalRequest for the transaction.
If no amount is set, PayPal will default to the billing agreement (Vault) flow.
If amount is set, PayPal will follow the one time payment (Checkout) flow.public DropInRequest disableGooglePayment()
public DropInRequest disablePayPal()
public DropInRequest disableVenmo()
public DropInRequest disableCard()
public DropInRequest requestThreeDSecureVerification(boolean requestThreeDSecure)
amount(String) or a ThreeDSecureRequest is provided,
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 DropInRequest threeDSecureRequest(ThreeDSecureRequest threeDSecureRequest)
threeDSecureRequest - ThreeDSecureRequest to specify options and additional information for 3D Secure.
To encourage 3DS 2.0 flows, set ThreeDSecureRequest#billingAddress(ThreeDSecurePostalAddress),
ThreeDSecureRequest#email(String), and ThreeDSecureRequest#mobilePhoneNumber(String) for best results.
If no amount is set, the amount(String) will be used.public DropInRequest maskCardNumber(boolean maskCardNumber)
maskCardNumber - true to mask the card number when the field is not focused.
See com.braintreepayments.cardform.view.CardEditText for more details. Defaults to
false.public DropInRequest maskSecurityCode(boolean maskSecurityCode)
maskSecurityCode - true to mask the security code during input. Defaults to false.public DropInRequest vaultManager(boolean vaultManager)
vaultManager - true to allow customers to manage their vaulted payment methods.
Defaults to false.public DropInRequest vaultCard(boolean defaultValue)
defaultValue - the default value used to determine if Drop-in should vault the customer's card. This setting can be overwritten by the customer if the save card checkbox is visible using allowVaultCardOverride(boolean)
If the save card CheckBox is shown, and default vault value is true: the save card CheckBox will appear pre-checked.
If the save card CheckBox is shown, and default vault value is false: the save card Checkbox will appear un-checked.
If the save card CheckBox is not shown, and default vault value is true: card always vaults.
If the save card CheckBox is not shown, and default vault value is false: card never vaults.
This value is true by default.public DropInRequest vaultVenmo(boolean defaultValue)
defaultValue - the default value used to determine if Drop-in should vault the customer's venmo payment method. Must be set to `false` when using a client token without a `customerId`.
This value is false by default.public DropInRequest allowVaultCardOverride(boolean customerCheckBoxEnabled)
customerCheckBoxEnabled - true shows save card CheckBox to allow user to choose whether or not to vault their card.
false does not show Save Card CheckBox.public DropInRequest cardholderNameStatus(int fieldStatus)
CardForm.
Default is CardForm#FIELD_DISABLED.
Can be CardForm#FIELD_DISABLED, CardForm#FIELD_OPTIONAL, or
CardForm#FIELD_REQUIRED.public android.content.Intent getIntent(android.content.Context context)
Intent that can be used in androidx.appcompat.app.AppCompatActivity#startActivityForResult(Intent, int)
to launch DropInActivity and the Drop-in UI.context - Intent containing all of the options set in DropInRequest.public java.lang.String getAuthorization()
public boolean isPayPalEnabled()
public PayPalRequest getPayPalRequest()
public boolean isVenmoEnabled()
public boolean isCardEnabled()
public GooglePaymentRequest getGooglePaymentRequest()
public boolean isGooglePaymentEnabled()
public ThreeDSecureRequest getThreeDSecureRequest()
public int getCardholderNameStatus()
public boolean getDefaultVaultSetting()
public boolean isSaveCardCheckBoxShown()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable