PaymentMethodTokenizationParameters.Builder

public final class PaymentMethodTokenizationParameters.Builder extends Object

Public Method Summary

PaymentMethodTokenizationParameters.Builder
addParameter(String name, String value)
Adds tokenization specific parameters.
PaymentMethodTokenizationParameters
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.Builder setPaymentMethodTokenizationType (int tokenizationType)

Sets payment method tokenization type. See WalletConstants.PaymentMethodTokenizationType for supported tokenization types.