Page Summary
-
PaymentMethodTokenizationParameters.Builderis a builder class used to createPaymentMethodTokenizationParametersobjects. -
It includes methods to add specific tokenization parameters and set the payment method tokenization type.
-
The
build()method is used to finalize thePaymentMethodTokenizationParametersobject from the builder. -
The
addParametermethod is useful for custom options beyond the tokenization type, such as gateway configuration.
Builder to create a PaymentMethodTokenizationParameters.
Public Method Summary
| PaymentMethodTokenizationParameters.Builder | |
| PaymentMethodTokenizationParameters |
build()
|
| PaymentMethodTokenizationParameters.Builder |
setPaymentMethodTokenizationType(int tokenizationType)
Sets payment method tokenization type.
|
Inherited Method Summary
Public Methods
public PaymentMethodTokenizationParameters.Builder addParameter (String name, String value)
Adds tokenization specific parameters.
This method is useful when in addition to tokenization type integrator needs to use custom options.
For example when integrator wants to use a gateway for tokenization the following parameters could be used:
Gateway name (lowercase):
name: "gateway"
value: "example"
Gateway merchant identifier (value varies by gateway):
name: "gatewayMerchantId"
value: "exampleGatewayMerchantId"
Sample configuration:
PaymentMethodTokenizationParameters parameters =
PaymentMethodTokenizationParameters.newBuilder()
.setPaymentMethodTokenizationType(
WalletConstants.PAYMENT_METHOD_TOKENIZATION_TYPE_PAYMENT_GATEWAY)
.addParameter("gateway", "example")
.addParameter("gatewayMerchantId", "exampleGatewayMerchantId")
.buid();Parameters
| name | the name of the parameter |
|---|---|
| value | the value of the parameter |
Throws
| IllegalArgumentException} when either name or value is empty |
public PaymentMethodTokenizationParameters build ()
public PaymentMethodTokenizationParameters.Builder setPaymentMethodTokenizationType (int tokenizationType)
Sets payment method tokenization type. See
WalletConstants.PaymentMethodTokenizationType for supported tokenization
types.