Class GooglePayConfiguration.Builder
-
- All Implemented Interfaces:
-
com.adyen.checkout.action.core.internal.ActionHandlingConfigurationBuilder,com.adyen.checkout.components.core.internal.ButtonConfigurationBuilder
@Deprecated(message = "Configuration classes are deprecated, use CheckoutConfiguration instead.") public final class GooglePayConfiguration.Builder extends ActionHandlingPaymentMethodConfigurationBuilder<GooglePayConfiguration, GooglePayConfiguration.Builder> implements ButtonConfigurationBuilder
Builder to create a GooglePayConfiguration.
-
-
Field Summary
Fields Modifier and Type Field Description private StringmerchantAccountprivate IntegergooglePayEnvironmentprivate MerchantInfomerchantInfoprivate StringcountryCodeprivate List<String>allowedAuthMethodsprivate List<String>allowedCardNetworksprivate List<String>allowedIssuerCountryCodesprivate List<String>blockedIssuerCountryCodesprivate BooleanisAllowPrepaidCardsprivate BooleanisAllowCreditCardsprivate BooleanisAssuranceDetailsRequiredprivate BooleanisEmailRequiredprivate BooleanisExistingPaymentMethodRequiredprivate BooleanisShippingAddressRequiredprivate ShippingAddressParametersshippingAddressParametersprivate BooleanisBillingAddressRequiredprivate BillingAddressParametersbillingAddressParametersprivate StringtotalPriceStatusprivate StringcheckoutOptionprivate GooglePayButtonStylinggooglePayButtonStylingprivate BooleanisSubmitButtonVisible
-
Constructor Summary
Constructors Constructor Description GooglePayConfiguration.Builder(Environment environment, String clientKey)Initialize a configuration builder with the required fields. GooglePayConfiguration.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. GooglePayConfiguration.Builder(Locale shopperLocale, Environment environment, String clientKey)Initialize a configuration builder with the required fields and a shopper locale.
-
Method Summary
-
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, setAnalyticsConfiguration, setShopperLocale -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
GooglePayConfiguration.Builder
GooglePayConfiguration.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.
-
GooglePayConfiguration.Builder
GooglePayConfiguration.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.
-
GooglePayConfiguration.Builder
GooglePayConfiguration.Builder(Locale shopperLocale, Environment environment, String clientKey)
Initialize a configuration builder with the required fields and a shopper locale.- 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
-
getMerchantAccount
final String getMerchantAccount()
-
setMerchantAccount
final Unit setMerchantAccount(String merchantAccount)
-
getGooglePayEnvironment
final Integer getGooglePayEnvironment()
-
setGooglePayEnvironment
final Unit setGooglePayEnvironment(Integer googlePayEnvironment)
-
getMerchantInfo
final MerchantInfo getMerchantInfo()
-
setMerchantInfo
final Unit setMerchantInfo(MerchantInfo merchantInfo)
-
getCountryCode
final String getCountryCode()
-
setCountryCode
final Unit setCountryCode(String countryCode)
-
getAllowedAuthMethods
final List<String> getAllowedAuthMethods()
-
setAllowedAuthMethods
final Unit setAllowedAuthMethods(List<String> allowedAuthMethods)
-
getAllowedCardNetworks
final List<String> getAllowedCardNetworks()
-
setAllowedCardNetworks
final Unit setAllowedCardNetworks(List<String> allowedCardNetworks)
-
getAllowedIssuerCountryCodes
final List<String> getAllowedIssuerCountryCodes()
-
setAllowedIssuerCountryCodes
final Unit setAllowedIssuerCountryCodes(List<String> allowedIssuerCountryCodes)
-
getBlockedIssuerCountryCodes
final List<String> getBlockedIssuerCountryCodes()
-
setBlockedIssuerCountryCodes
final Unit setBlockedIssuerCountryCodes(List<String> blockedIssuerCountryCodes)
-
isAllowPrepaidCards
final Boolean isAllowPrepaidCards()
-
setAllowPrepaidCards
final Unit setAllowPrepaidCards(Boolean isAllowPrepaidCards)
-
isAllowCreditCards
final Boolean isAllowCreditCards()
-
setAllowCreditCards
final Unit setAllowCreditCards(Boolean isAllowCreditCards)
-
isAssuranceDetailsRequired
final Boolean isAssuranceDetailsRequired()
-
setAssuranceDetailsRequired
final Unit setAssuranceDetailsRequired(Boolean isAssuranceDetailsRequired)
-
isEmailRequired
final Boolean isEmailRequired()
-
setEmailRequired
final Unit setEmailRequired(Boolean isEmailRequired)
-
isExistingPaymentMethodRequired
final Boolean isExistingPaymentMethodRequired()
-
setExistingPaymentMethodRequired
final Unit setExistingPaymentMethodRequired(Boolean isExistingPaymentMethodRequired)
-
isShippingAddressRequired
final Boolean isShippingAddressRequired()
-
setShippingAddressRequired
final Unit setShippingAddressRequired(Boolean isShippingAddressRequired)
-
getShippingAddressParameters
final ShippingAddressParameters getShippingAddressParameters()
-
setShippingAddressParameters
final Unit setShippingAddressParameters(ShippingAddressParameters shippingAddressParameters)
-
isBillingAddressRequired
final Boolean isBillingAddressRequired()
-
setBillingAddressRequired
final Unit setBillingAddressRequired(Boolean isBillingAddressRequired)
-
getBillingAddressParameters
final BillingAddressParameters getBillingAddressParameters()
-
setBillingAddressParameters
final Unit setBillingAddressParameters(BillingAddressParameters billingAddressParameters)
-
getTotalPriceStatus
final String getTotalPriceStatus()
-
setTotalPriceStatus
final Unit setTotalPriceStatus(String totalPriceStatus)
-
getCheckoutOption
final String getCheckoutOption()
-
setCheckoutOption
final Unit setCheckoutOption(String checkoutOption)
-
getGooglePayButtonStyling
final GooglePayButtonStyling getGooglePayButtonStyling()
-
setGooglePayButtonStyling
final Unit setGooglePayButtonStyling(GooglePayButtonStyling googlePayButtonStyling)
-
isSubmitButtonVisible
final Boolean isSubmitButtonVisible()
-
setSubmitButtonVisible
final Unit setSubmitButtonVisible(@Deprecated(message = "Configure this in CheckoutConfiguration instead.") Boolean isSubmitButtonVisible)
-
setMerchantAccount
final GooglePayConfiguration.Builder setMerchantAccount(String merchantAccount)
Set the merchant account to be put in the payment token from Google to Adyen.
If not set then PaymentMethod.configuration.gatewayMerchantId will be used. If that value is also not set, an exception will be thrown indicating that you need to update you Adyen API version or pass this value manually.
- Parameters:
merchantAccount- Your merchant account.
-
setGooglePayEnvironment
final GooglePayConfiguration.Builder setGooglePayEnvironment(Integer googlePayEnvironment)
Sets the environment to be used by GooglePay. Should be either WalletConstants.ENVIRONMENT_TEST or WalletConstants.ENVIRONMENT_PRODUCTION.
Default follows the value of the Adyen environment.
- Parameters:
googlePayEnvironment- The GooglePay environment.
-
setMerchantInfo
final GooglePayConfiguration.Builder setMerchantInfo(MerchantInfo merchantInfo)
Sets the information about the merchant requesting the payment.
Check the Google Pay docs for more details.
-
setCountryCode
final GooglePayConfiguration.Builder setCountryCode(String countryCode)
Sets the ISO 3166-1 alpha-2 country code where the transaction is processed.
Check the Google Pay docs for more details.
-
setAllowedAuthMethods
final GooglePayConfiguration.Builder setAllowedAuthMethods(List<String> allowedAuthMethods)
Sets the supported authentication methods. Check AllowedAuthMethods for all the possible values.
Default is "PAN_ONLY", "CRYPTOGRAM_3DS".
Check the Google Pay docs for more details.
-
setAllowedCardNetworks
final GooglePayConfiguration.Builder setAllowedCardNetworks(List<String> allowedCardNetworks)
Sets the allowed card networks. The allowed networks are automatically configured based on your account settings, but you can override them here. Check AllowedCardNetworks for all the possible values.
Default is "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA".
Check the Google Pay docs for more details.
-
setAllowedIssuerCountryCodes
final GooglePayConfiguration.Builder setAllowedIssuerCountryCodes(List<String> allowedIssuerCountryCodes)
Sets the allowed issuer country codes. This list should contain ISO 3166-1 alpha-2 country codes. When set the shopper will only be able to select payment methods issued in the provided countries.
Note: allowedIssuerCountryCodes and blockedIssuerCountryCodes are mutually exclusive. Only set one at a time.
Check the Google Pay docs for more details.
-
setBlockedIssuerCountryCodes
final GooglePayConfiguration.Builder setBlockedIssuerCountryCodes(List<String> blockedIssuerCountryCodes)
Sets the blocked issuer country codes. This list should contain ISO 3166-1 alpha-2 country codes. When set the shopper will not be able to select payment methods issued in the provided countries.
Note: allowedIssuerCountryCodes and blockedIssuerCountryCodes are mutually exclusive. Only set one at a time.
Check the Google Pay docs for more details.
-
setAllowPrepaidCards
final GooglePayConfiguration.Builder setAllowPrepaidCards(Boolean isAllowPrepaidCards)
-
setAllowCreditCards
final GooglePayConfiguration.Builder setAllowCreditCards(Boolean isAllowCreditCards)
Set if you support credit cards.
Default is true for the specified card networks.
Check the Google Pay docs for more details.
-
setAssuranceDetailsRequired
final GooglePayConfiguration.Builder setAssuranceDetailsRequired(Boolean isAssuranceDetailsRequired)
Set to true to request assurance details.
Default is false.
Check the Google Pay docs for more details.
-
setEmailRequired
final GooglePayConfiguration.Builder setEmailRequired(Boolean isEmailRequired)
Set to true if you require an email address.
Default is false.
Check the Google Pay docs for more details.
-
setExistingPaymentMethodRequired
final GooglePayConfiguration.Builder setExistingPaymentMethodRequired(Boolean isExistingPaymentMethodRequired)
Default is false.
Check the Google Pay docs for more details.
-
setShippingAddressRequired
final GooglePayConfiguration.Builder setShippingAddressRequired(Boolean isShippingAddressRequired)
Set to true if you require a shipping address.
Default is false.
Check the Google Pay docs for more details.
-
setShippingAddressParameters
final GooglePayConfiguration.Builder setShippingAddressParameters(ShippingAddressParameters shippingAddressParameters)
Sets the required shipping address details.
Check the Google Pay docs for more details.
-
setBillingAddressRequired
final GooglePayConfiguration.Builder setBillingAddressRequired(Boolean isBillingAddressRequired)
Set to true if you require a billing address.
Default is false.
Check the Google Pay docs for more details.
-
setBillingAddressParameters
final GooglePayConfiguration.Builder setBillingAddressParameters(BillingAddressParameters billingAddressParameters)
Sets the required billing address details.
Check the Google Pay docs for more details.
-
setTotalPriceStatus
final GooglePayConfiguration.Builder setTotalPriceStatus(String totalPriceStatus)
Sets the status of the total price used.
Default is "FINAL".
Check the Google Pay docs for more details.
-
setCheckoutOption
final GooglePayConfiguration.Builder setCheckoutOption(String checkoutOption)
Sets the checkout option. This affects the submit button text displayed in the Google Pay sheet.
Check the Google Pay docs for more details.
-
setAmount
GooglePayConfiguration.Builder setAmount(Amount amount)
Sets the amount of the transaction.
Default is 0 USD.
Check the totalPrice field in the Google Pay docs for more details.
Not applicable for the sessions flow. Check out the Sessions API documentation on how to set this value.
- Parameters:
amount- Amount of the transaction.
-
setGooglePayButtonStyling
final GooglePayConfiguration.Builder setGooglePayButtonStyling(GooglePayButtonStyling googlePayButtonStyling)
Set a GooglePayButtonStyling object for customization of the Google Pay button.
- Parameters:
googlePayButtonStyling- The customization object.
-
setSubmitButtonVisible
GooglePayConfiguration.Builder setSubmitButtonVisible(Boolean isSubmitButtonVisible)
Sets if submit button will be visible or not.
Default is false.
- Parameters:
isSubmitButtonVisible- If submit button should be visible or not.
-
-
-
-