Class CardConfiguration.Builder
-
- All Implemented Interfaces:
-
com.adyen.checkout.action.core.internal.ActionHandlingConfigurationBuilder,com.adyen.checkout.components.core.internal.ButtonConfigurationBuilder
public final class CardConfiguration.Builder extends ActionHandlingPaymentMethodConfigurationBuilder<CardConfiguration, CardConfiguration.Builder> implements ButtonConfigurationBuilder
Builder to create a CardConfiguration.
-
-
Constructor Summary
Constructors Constructor Description CardConfiguration.Builder(Environment environment, String clientKey)Initialize a configuration builder with the required fields. CardConfiguration.Builder(Context context, Environment environment, String clientKey)Alternative constructor that uses the context to fetch the user locale and use it as a shopper locale. CardConfiguration.Builder(Locale shopperLocale, Environment environment, String clientKey)Builder with parameters for a CardConfiguration.
-
Method Summary
Modifier and Type Method Description final CardConfiguration.BuildersetSupportedCardTypes(CardBrand supportCardBrands)Set the supported card types for this payment. final CardConfiguration.BuildersetSupportedCardTypes(CardType supportCardTypes)Set the supported card types for this payment. final CardConfiguration.BuildersetHolderNameRequired(Boolean holderNameRequired)Set if the holder name is required and should be shown as an input field. final CardConfiguration.BuildersetShowStorePaymentField(Boolean showStorePaymentField)Set if the option to store the card for future payments should be shown as an input field. final CardConfiguration.BuildersetShopperReference(String shopperReference)Set the unique reference for the shopper doing this transaction. final CardConfiguration.BuildersetHideCvc(Boolean hideCvc)Set if the CVC field should be hidden from the Component and not requested to the shopper on a regular payment. final CardConfiguration.BuildersetHideCvcStoredCard(Boolean hideCvcStoredCard)Set if the CVC field should be hidden from the Component and not requested to the shopper on a stored payment flow. final CardConfiguration.BuildersetSocialSecurityNumberVisibility(SocialSecurityNumberVisibility socialSecurityNumberVisibility)Set if CPF/CNPJ field for Brazil merchants should be visible or not. final CardConfiguration.BuildersetKcpAuthVisibility(KCPAuthVisibility kcpAuthVisibility)Set if security fields for Korean cards should be visible or not. final CardConfiguration.BuildersetInstallmentConfigurations(InstallmentConfiguration installmentConfiguration)Configures the installment options to be provided to the shopper. final CardConfiguration.BuildersetAddressConfiguration(AddressConfiguration addressConfiguration)Configures the address form to be shown to the shopper. CardConfiguration.BuildersetSubmitButtonVisible(Boolean isSubmitButtonVisible)Sets if submit button will be visible or not. -
Methods inherited from class com.adyen.checkout.action.core.internal.ActionHandlingPaymentMethodConfigurationBuilder
add3ds2ActionConfiguration, addAwaitActionConfiguration, addQRCodeActionConfiguration, addRedirectActionConfiguration, addTwintActionConfiguration, addVoucherActionConfiguration, addWeChatPayActionConfiguration -
Methods inherited from class com.adyen.checkout.components.core.internal.BaseConfigurationBuilder
build, setAmount, setAnalyticsConfiguration, setShopperLocale -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CardConfiguration.Builder
CardConfiguration.Builder(Environment environment, String clientKey)
Initialize a configuration builder with the required fields.- Parameters:
environment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.
-
CardConfiguration.Builder
CardConfiguration.Builder(Context context, Environment environment, String clientKey)
Alternative constructor that uses the context to fetch the user locale and use it as a shopper locale.- Parameters:
context- A Contextenvironment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.
-
CardConfiguration.Builder
CardConfiguration.Builder(Locale shopperLocale, Environment environment, String clientKey)
Builder with parameters for a CardConfiguration.- Parameters:
shopperLocale- The Locale of the shopper.environment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.
-
-
Method Detail
-
setSupportedCardTypes
final CardConfiguration.Builder setSupportedCardTypes(CardBrand supportCardBrands)
Set the supported card types for this payment. Supported types will be shown as user inputs the card number.
Defaults to PaymentMethod.brands if it exists, or DEFAULT_SUPPORTED_CARDS_LIST otherwise.
Use this method when adding supported types that are not inside the CardType enum.
- Parameters:
supportCardBrands- array of CardBrand- Returns:
-
setSupportedCardTypes
final CardConfiguration.Builder setSupportedCardTypes(CardType supportCardTypes)
Set the supported card types for this payment. Supported types will be shown as user inputs the card number.
Defaults to PaymentMethod.brands if it exists, or DEFAULT_SUPPORTED_CARDS_LIST otherwise.
- Parameters:
supportCardTypes- array of CardType- Returns:
-
setHolderNameRequired
final CardConfiguration.Builder setHolderNameRequired(Boolean holderNameRequired)
Set if the holder name is required and should be shown as an input field.
Default is false.
- Parameters:
holderNameRequired- Boolean- Returns:
-
setShowStorePaymentField
final CardConfiguration.Builder setShowStorePaymentField(Boolean showStorePaymentField)
Set if the option to store the card for future payments should be shown as an input field.
Default is true.
Not applicable for the sessions flow. Check out the Sessions API documentation on how to set this value.
- Parameters:
showStorePaymentField- Boolean- Returns:
-
setShopperReference
final CardConfiguration.Builder setShopperReference(String shopperReference)
Set the unique reference for the shopper doing this transaction. This value will simply be passed back to you in the PaymentComponentData for convenience.
- Parameters:
shopperReference- The unique shopper reference- Returns:
-
setHideCvc
final CardConfiguration.Builder setHideCvc(Boolean hideCvc)
Set if the CVC field should be hidden from the Component and not requested to the shopper on a regular payment. Note that this might have implications for the risk of the transaction. Talk to Adyen Support before enabling this.
Default is false.
- Parameters:
hideCvc- If CVC should be hidden or not.- Returns:
-
setHideCvcStoredCard
final CardConfiguration.Builder setHideCvcStoredCard(Boolean hideCvcStoredCard)
Set if the CVC field should be hidden from the Component and not requested to the shopper on a stored payment flow. Note that this has implications for the risk of the transaction. Talk to Adyen Support before enabling this.
Default is false.
- Parameters:
hideCvcStoredCard- If CVC should be hidden or not for stored payments.- Returns:
-
setSocialSecurityNumberVisibility
final CardConfiguration.Builder setSocialSecurityNumberVisibility(SocialSecurityNumberVisibility socialSecurityNumberVisibility)
Set if CPF/CNPJ field for Brazil merchants should be visible or not.
Default is SocialSecurityNumberVisibility.HIDE.
- Parameters:
socialSecurityNumberVisibility- If CPF/CNPJ field should be visible or not.- Returns:
-
setKcpAuthVisibility
final CardConfiguration.Builder setKcpAuthVisibility(KCPAuthVisibility kcpAuthVisibility)
Set if security fields for Korean cards should be visible or not.
Default is KCPAuthVisibility.HIDE.
- Parameters:
kcpAuthVisibility- If security fields for Korean cards should be visible or not.- Returns:
-
setInstallmentConfigurations
final CardConfiguration.Builder setInstallmentConfigurations(InstallmentConfiguration installmentConfiguration)
Configures the installment options to be provided to the shopper.
Not applicable for the sessions flow. Check out the Sessions API documentation on how to set this value.
- Parameters:
installmentConfiguration- The configuration object for installment options.- Returns:
-
setAddressConfiguration
final CardConfiguration.Builder setAddressConfiguration(AddressConfiguration addressConfiguration)
Configures the address form to be shown to the shopper.
Default is AddressConfiguration.None.
- Parameters:
addressConfiguration- The configuration object for address form.- Returns:
-
setSubmitButtonVisible
CardConfiguration.Builder setSubmitButtonVisible(Boolean isSubmitButtonVisible)
Sets if submit button will be visible or not.
Default is True.
- Parameters:
isSubmitButtonVisible- Is submit button should be visible or not.
-
-
-
-