-
- All Implemented Interfaces:
public class ThreeDSConfig.Builder
Class to build
OppThreeDSConfig
class with customized parameters.
-
-
Field Summary
Fields Modifier and Type Field Description private EnumSet<ChallengeUiType>
challengeUiTypes
private int
sdkMaxTimeout
private UiCustomization
uiCustomization
private String
locale
private Array<String>
deviceParameterBlacklist
private String
appSignature
private Array<String>
trustedAppStores
private Array<String>
maliciousApps
-
Constructor Summary
Constructors Constructor Description ThreeDSConfig.Builder()
ThreeDSConfig.Builder(ThreeDSConfig config)
Copy constructor for the Builder class
-
Method Summary
Modifier and Type Method Description ThreeDSConfig.Builder
setChallengeUiTypes(@Nullable() EnumSet<ChallengeUiType> challengeUiTypes)
Sets supported UI types for displaying challenge screens. ThreeDSConfig.Builder
setSdkMaxTimeout(int sdkMaxTimeout)
Sets maximum amount of time (in minutes) for all exchanges for the 3-D Secure authentication. ThreeDSConfig.Builder
setUiCustomization(@Nullable() UiCustomization uiCustomization)
Sets UI configuration information that is used to specify the UI layout and theme of the challenge screens, for example, font style and font size. ThreeDSConfig.Builder
setLocale(@Nullable() String locale)
Sets string that represents the locale for the app's user interface. ThreeDSConfig.Builder
setDeviceParameterBlacklist(@Nullable() Array<String> deviceParameterBlacklist)
Sets the list of device parameters that should NOT be collected for the device. ThreeDSConfig.Builder
setAppSignature(@Nullable() String appSignature)
Sets app signature to be verified by the SDK. ThreeDSConfig.Builder
setTrustedAppStores(@Nullable() Array<String> trustedAppStores)
Sets additional list of trusted applications, that would not cause security warnings (SW02). ThreeDSConfig.Builder
setMaliciousApps(@Nullable() Array<String> maliciousApps)
Sets the list of package names for the apps that should be recognized as malicious. ThreeDSConfig.Builder
addClientConfigParam(@NonNull() String key, @NonNull() String value)
Sets value for the custom parameter for the /n software Client
component.ThreeDSConfig.Builder
setThreeDSRequestorAppUrlUsed(boolean threeDSRequestorAppUrlUsed)
Sets value to indicate if threeDSRequestorAppUrl should be used or not. ThreeDSConfig.Builder
setBrowserDataRequired(boolean browserDataRequired)
Sets whether browser data is required or not. ThreeDSConfig
build()
Creates OppThreeDSConfig
initialized with all set earlier parameters.-
-
Constructor Detail
-
ThreeDSConfig.Builder
ThreeDSConfig.Builder()
-
ThreeDSConfig.Builder
ThreeDSConfig.Builder(ThreeDSConfig config)
Copy constructor for the Builder class- Parameters:
config
- Config class to be copied into Builder
-
-
Method Detail
-
setChallengeUiTypes
@NonNull() ThreeDSConfig.Builder setChallengeUiTypes(@Nullable() EnumSet<ChallengeUiType> challengeUiTypes)
Sets supported UI types for displaying challenge screens. They may vary for native way, e.g. present OTP or single select screen. By default all UI types are supported, it's strongly recommended by EMVCo.
- Parameters:
challengeUiTypes
- set of supported UI types for displaying challenge screens
-
setSdkMaxTimeout
@NonNull() ThreeDSConfig.Builder setSdkMaxTimeout(int sdkMaxTimeout)
Sets maximum amount of time (in minutes) for all exchanges for the 3-D Secure authentication. Default value is 5 minutes.
- Parameters:
sdkMaxTimeout
- maximum amount of time in minutes for all exchanges for 3-D Secure authentication
-
setUiCustomization
@NonNull() ThreeDSConfig.Builder setUiCustomization(@Nullable() UiCustomization uiCustomization)
Sets UI configuration information that is used to specify the UI layout and theme of the challenge screens, for example, font style and font size.
- Parameters:
uiCustomization
- UI configuration info to be applied for the challenge screens
-
setLocale
@NonNull() ThreeDSConfig.Builder setLocale(@Nullable() String locale)
Sets string that represents the locale for the app's user interface.
- Parameters:
locale
- string representation of the locale (for example, "en-US")
-
setDeviceParameterBlacklist
@NonNull() ThreeDSConfig.Builder setDeviceParameterBlacklist(@Nullable() Array<String> deviceParameterBlacklist)
Sets the list of device parameters that should NOT be collected for the device. By default, the SDK will pull as many device parameters as it can. Refer to the "EMV® 3-D Secure SDK—Device Information" guide to see the full list of possible device parameters and appropriate constants to be used. Sample values would be
["A001", "A002"]
.- Parameters:
deviceParameterBlacklist
- the list of device parameters that should NOT be collected
-
setAppSignature
@NonNull() ThreeDSConfig.Builder setAppSignature(@Nullable() String appSignature)
Sets app signature to be verified by the SDK. If verification fail security warning (SW02) will be raised. The user should store the app signature to their server and retrieve it (and set it here). Note that this should not be hardcoded in the app for security reasons.
- Parameters:
appSignature
- Signature of the user's app to be verified by the SDK during service initialization
-
setTrustedAppStores
@NonNull() ThreeDSConfig.Builder setTrustedAppStores(@Nullable() Array<String> trustedAppStores)
Sets additional list of trusted applications, that would not cause security warnings (SW02). A security warning (SW02) will be raised if the app is not installed from the Google app store. Add some other applications that will be recognized by security checker as trusted.
- Parameters:
trustedAppStores
- the list of package names of the trusted applications
-
setMaliciousApps
@NonNull() ThreeDSConfig.Builder setMaliciousApps(@Nullable() Array<String> maliciousApps)
Sets the list of package names for the apps that should be recognized as malicious. If the apps are installed, a security warning (SW02) will be raised. This could be checked in getThreeDS2Warnings after service is initialized. There are some default malicious apps configured inside by default:
- de.robv.android.xposed
- de.robv.android.xposed.installer
- com.saurik.substrate
- Parameters:
maliciousApps
- the list of package names of malicious applications
-
addClientConfigParam
@NonNull() ThreeDSConfig.Builder addClientConfigParam(@NonNull() String key, @NonNull() String value)
Sets value for the custom parameter for the /n software
Client
component. See /n software ClientConfig guide for the keys. Sample valueaddClientConfigParam("AcceptAnyACSCert", "true")
- Parameters:
key
- the key of the custom parametervalue
- the value to be assigned for the custom parameter
-
setThreeDSRequestorAppUrlUsed
@NonNull() ThreeDSConfig.Builder setThreeDSRequestorAppUrlUsed(boolean threeDSRequestorAppUrlUsed)
Sets value to indicate if threeDSRequestorAppUrl should be used or not.
- Parameters:
threeDSRequestorAppUrlUsed
-true
if threeDSRequestorAppUrl should be used, otherwisefalse
-
setBrowserDataRequired
@NonNull() ThreeDSConfig.Builder setBrowserDataRequired(boolean browserDataRequired)
Sets whether browser data is required or not. If `browserDataRequired` is set to `true`, the browser details will be collected and sent in payment request for example - Browser language, Screen height and width, Timezone etc.. If `browserDataRequired` is set to `false`, then above listed browser details will not be passed in payment request.
- Parameters:
browserDataRequired
- \code{true} if browser data is required, otherwise \code{false}.
-
build
@NonNull() ThreeDSConfig build()
Creates
OppThreeDSConfig
initialized with all set earlier parameters.
-
-
-
-