Class GooglePayConfiguration.Builder
-
- All Implemented Interfaces:
-
com.adyen.checkout.action.core.internal.ActionHandlingConfigurationBuilder
public final class GooglePayConfiguration.Builder extends ActionHandlingPaymentMethodConfigurationBuilder<GooglePayConfiguration, GooglePayConfiguration.Builder>
Builder to create a GooglePayConfiguration.
-
-
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
Modifier and Type Method Description final GooglePayConfiguration.BuildersetMerchantAccount(String merchantAccount)Set the merchant account to be put in the payment token from Google to Adyen. final GooglePayConfiguration.BuildersetGooglePayEnvironment(Integer googlePayEnvironment)Sets the environment to be used by GooglePay. final GooglePayConfiguration.BuildersetMerchantInfo(MerchantInfo merchantInfo)Sets the information about the merchant requesting the payment. final GooglePayConfiguration.BuildersetCountryCode(String countryCode)Sets the ISO 3166-1 alpha-2 country code where the transaction is processed. final GooglePayConfiguration.BuildersetAllowedAuthMethods(List<String> allowedAuthMethods)Sets the supported authentication methods. final GooglePayConfiguration.BuildersetAllowedCardNetworks(List<String> allowedCardNetworks)Sets the allowed card networks. final GooglePayConfiguration.BuildersetAllowPrepaidCards(Boolean isAllowPrepaidCards)Set if you support prepaid cards. final GooglePayConfiguration.BuildersetAllowCreditCards(Boolean isAllowCreditCards)Set if you support credit cards. final GooglePayConfiguration.BuildersetAssuranceDetailsRequired(Boolean isAssuranceDetailsRequired)Set to true to request assurance details. final GooglePayConfiguration.BuildersetEmailRequired(Boolean isEmailRequired)Set to true if you require an email address. final GooglePayConfiguration.BuildersetExistingPaymentMethodRequired(Boolean isExistingPaymentMethodRequired)Default is false. final GooglePayConfiguration.BuildersetShippingAddressRequired(Boolean isShippingAddressRequired)Set to true if you require a shipping address. final GooglePayConfiguration.BuildersetShippingAddressParameters(ShippingAddressParameters shippingAddressParameters)Sets the required shipping address details. final GooglePayConfiguration.BuildersetBillingAddressRequired(Boolean isBillingAddressRequired)Set to true if you require a billing address. final GooglePayConfiguration.BuildersetBillingAddressParameters(BillingAddressParameters billingAddressParameters)Sets the required billing address details. final GooglePayConfiguration.BuildersetTotalPriceStatus(String totalPriceStatus)Sets the status of the total price used. GooglePayConfiguration.BuildersetAmount(Amount amount)Sets the amount of the transaction. -
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
-
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.
-
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.
-
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.
-
-
-
-