CardRequirements.Builder

public final classCardRequirements.BuilderextendsObject

Builder to create aCardRequirements.

Public Method Summary

CardRequirements.Builder
addAllowedCardNetwork(int allowedCardNetwork)
Adds a card network supported for this purchase.
CardRequirements.Builder
addAllowedCardNetworks(Collection<Integer> allowedCardNetworks)
Adds a set of card networks supported for this purchase.
CardRequirements
build()
Returns the actualCardRequirements created using the data passed to the Builder object.
CardRequirements.Builder
setAllowPrepaidCards(boolean allowPrepaidCards)
Sets whether a prepaid card may be used for this transaction.
CardRequirements.Builder
setBillingAddressFormat(int billingAddressFormat)
Sets billing address format.
CardRequirements.Builder
setBillingAddressRequired(boolean billingAddressRequired)
Sets whether a billing address is required from the buyer.

Inherited Method Summary

Public Methods

publicCardRequirements.Builder addAllowedCardNetwork(int allowedCardNetwork)

Adds a card network supported for this purchase. SeeWalletConstants.CardNetwork for available options.

Allowed card networks must be explicitly set using either this method or addAllowedCardNetworks(Collection).

publicCardRequirements.Builder addAllowedCardNetworks(Collection<Integer> allowedCardNetworks)

Adds a set of card networks supported for this purchase. SeeWalletConstants.CardNetwork for available options.

Allowed card networks must be explicitly set using either this method or addAllowedCardNetwork(int).

publicCardRequirements build()

Returns the actualCardRequirements created using the data passed to the Builder object.

publicCardRequirements.Builder setAllowPrepaidCards(boolean allowPrepaidCards)

Sets whether a prepaid card may be used for this transaction. If omitted, defaults totrue.

publicCardRequirements.Builder setBillingAddressFormat(int billingAddressFormat)

Sets billing address format. See WalletConstants.BillingAddressFormatfor more info. If omitted, defaults to WalletConstants.BILLING_ADDRESS_FORMAT_MIN.

Only set the format to WalletConstants.BILLING_ADDRESS_FORMAT_FULLwhen it's required to process the order since this setting can increase friction during the checkout process and can lower your conversion rate.

publicCardRequirements.Builder setBillingAddressRequired(boolean billingAddressRequired)

Sets whether a billing address is required from the buyer. The returned billing address can be retrieved byCardInfo.getBillingAddress() inPaymentData.getCardInfo(). If omitted, defaults to false.

Optionally, when a billing address is required, extra format requirements can be set through setBillingAddressFormat(int).