public class PaymentRequest
extends java.lang.Object
implements android.os.Parcelable
BraintreePaymentActivity and PaymentButton with specified options.| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<PaymentRequest> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
PaymentRequest() |
protected |
PaymentRequest(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
PaymentRequest |
actionBarLogo(int drawable)
This method is optional.
|
PaymentRequest |
actionBarTitle(java.lang.String title)
This method is optional.
|
PaymentRequest |
amount(java.lang.String amount)
This method is optional.
|
PaymentRequest |
androidPayAllowedCountriesForShipping(java.lang.String... countryCodes)
This method is optional.
|
PaymentRequest |
androidPayCart(Cart cart)
This method is optional.
|
PaymentRequest |
androidPayPhoneNumberRequired(boolean phoneNumberRequired)
This method is optional.
|
PaymentRequest |
androidPayRequestCode(int requestCode)
This method is optional.
|
PaymentRequest |
androidPayShippingAddressRequired(boolean shippingAddressRequired)
This method is optional.
|
PaymentRequest |
clientToken(java.lang.String clientToken)
Provide authorization allowing this client to communicate with Braintree.
|
PaymentRequest |
collectDeviceData(boolean collectDeviceData)
This method is optional.
|
PaymentRequest |
currencyCode(java.lang.String currencyCode)
This method is currently unused.
|
int |
describeContents() |
PaymentRequest |
disableAndroidPay()
Disables Android Pay in the
PaymentButton or Drop-in. |
PaymentRequest |
disablePayPal()
Disables PayPal in the
PaymentButton or Drop-in. |
PaymentRequest |
disableVenmo()
Disables Venmo in the
PaymentButton or Drop-in. |
android.content.Intent |
getIntent(android.content.Context context)
Get an
Intent that can be used in Activity.startActivityForResult(Intent, int)
to launch BraintreePaymentActivity and the Drop-in UI. |
PaymentRequest |
paypalAdditionalScopes(java.util.List<java.lang.String> additionalScopes)
Set additional scopes to request when a user is authorizing PayPal.
|
PaymentRequest |
primaryDescription(java.lang.String primaryDescription)
This method is optional.
|
PaymentRequest |
secondaryDescription(java.lang.String secondaryDescription)
This method is optional.
|
PaymentRequest |
submitButtonText(java.lang.String submitButtonText)
This method is optional.
|
PaymentRequest |
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 android.os.Parcelable.Creator<PaymentRequest> CREATOR
public PaymentRequest()
protected PaymentRequest(android.os.Parcel in)
public PaymentRequest 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 PaymentRequest 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 PaymentRequest amount(java.lang.String amount)
amount - Amount of the transaction.public PaymentRequest currencyCode(java.lang.String currencyCode)
public PaymentRequest collectDeviceData(boolean collectDeviceData)
collectDeviceData - true if Drop-in should collect and return device data for
fraud prevention.DataCollectorpublic PaymentRequest androidPayCart(Cart cart)
cart - The Android Pay Cart for the transaction.public PaymentRequest androidPayShippingAddressRequired(boolean shippingAddressRequired)
shippingAddressRequired - true if Android Pay requests should request a
shipping address from the user.public PaymentRequest androidPayPhoneNumberRequired(boolean phoneNumberRequired)
phoneNumberRequired - true if Android Pay requests should request a phone
number from the user.public PaymentRequest androidPayRequestCode(int requestCode)
requestCode - The requestCode to use when making an Android Pay
com.google.android.gms.wallet.MaskedWalletRequest with
Activity.startActivityForResult(Intent, int)}.public PaymentRequest androidPayAllowedCountriesForShipping(java.lang.String... countryCodes)
countryCodes - countries to which shipping is supported.
Follows the ISO 3166-2 format (ex: "US", "CA", "JP")public PaymentRequest disableAndroidPay()
PaymentButton or Drop-in.public PaymentRequest 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 PaymentRequest disablePayPal()
PaymentButton or Drop-in.public PaymentRequest disableVenmo()
PaymentButton or Drop-in.public PaymentRequest actionBarTitle(java.lang.String title)
title - The title to display in the action bar when present.public PaymentRequest actionBarLogo(int drawable)
drawable - The icon to display in the action bar when present.public PaymentRequest primaryDescription(java.lang.String primaryDescription)
primaryDescription - Main header for description bar. Displayed in bold.public PaymentRequest secondaryDescription(java.lang.String secondaryDescription)
secondaryDescription - Subheader for description bar. Displayed in normal weight text.public PaymentRequest submitButtonText(java.lang.String submitButtonText)
submitButtonText - Text for submit button. Displayed in uppercase.
Will be combined with amount if set via amount(String).public android.content.Intent getIntent(android.content.Context context)
Intent that can be used in Activity.startActivityForResult(Intent, int)
to launch BraintreePaymentActivity and the Drop-in UI.context - Intent containing all of the options set in PaymentRequest.public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable