Package com.gemalto.mfs.mwsdk.dcm
Class WalletPinManager
- java.lang.Object
-
- com.gemalto.mfs.mwsdk.dcm.WalletPinManager
-
public final class WalletPinManager extends java.lang.Object
A class to manage the wallet pin use case (e.g. set, change or verify).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
askWalletPinForLVT(boolean flag)
Deprecated.this API is deprecated since 6.5.0.void
bindAbstractWalletPinService(AbstractWalletPinService abstractWalletPinService)
A method to link the instance ofWalletPinManager
withAbstractWalletPinService
for performing wallet PIN operations.static WalletPinManager
getInstance()
A method to get the instance ofWalletPinManager
to perform wallet pin operations.int
getRemainingRetries()
An API to get the number of remaining retries for invalid wallet PIN entry.void
invokeChangeWalletPin()
An API to initialize the wallet PIN change.void
invokeSetWalletPin()
A method to invoke set new wallet PIN if not set before.boolean
isAskWalletPinForLVT()
Deprecated.this API is deprecated since 6.5.0.boolean
isWalletPinSet()
A method to check if the wallet PIN has been previously set viaAbstractWalletPinService.onSetWalletPin(CHCodeVerifier)
.
-
-
-
Method Detail
-
getInstance
public static WalletPinManager getInstance()
A method to get the instance ofWalletPinManager
to perform wallet pin operations.- Returns:
instance
-
bindAbstractWalletPinService
public void bindAbstractWalletPinService(AbstractWalletPinService abstractWalletPinService)
A method to link the instance ofWalletPinManager
withAbstractWalletPinService
for performing wallet PIN operations.- Parameters:
abstractWalletPinService
-
-
isWalletPinSet
public boolean isWalletPinSet() throws WalletPinException
A method to check if the wallet PIN has been previously set viaAbstractWalletPinService.onSetWalletPin(CHCodeVerifier)
. Note: This should be done before using any wallet PIN related functions- Returns:
- boolean - true if set, false if not set.
- Throws:
WalletPinException
-
invokeSetWalletPin
public void invokeSetWalletPin() throws WalletPinException
A method to invoke set new wallet PIN if not set before. Calls the implementedAbstractWalletPinService.onSetWalletPin(CHCodeVerifier)
to set a new wallet pin.- Throws:
WalletPinException
-
invokeChangeWalletPin
public void invokeChangeWalletPin() throws WalletPinException
An API to initialize the wallet PIN change. The SDK will control the flow using the implementedAbstractWalletPinService
class. The flow sequence shall be the following:
(1)AbstractWalletPinService.onVerifyWalletPin(CHCodeVerifier)
(2)AbstractWalletPinService.onSetWalletPin(CHCodeVerifier)
- Throws:
WalletPinException
-
askWalletPinForLVT
public void askWalletPinForLVT(boolean flag) throws WalletPinException
Deprecated.this API is deprecated since 6.5.0. To enforce WalletPIN LVT payment with authentication, refer toCustomConfiguration.Builder
to enforce authentication for LVT transaction.This API is used whenever the end-user chooses to enable/disable the wallet PIN entry for low value transactions. The default is no PIN is required for LVT. The flow sequence shall be the following:
(1)AbstractWalletPinService.onVerifyWalletPin(CHCodeVerifier)
- Parameters:
flag
- - True to always ask for a wallet pin on LVT. False if wallet pin skipped on LVT.- Throws:
WalletPinException
-
isAskWalletPinForLVT
public boolean isAskWalletPinForLVT() throws WalletPinException
Deprecated.this API is deprecated since 6.5.0. To enforce WalletPIN LVT payment with authentication, refer toCustomConfiguration.Builder
to enforce authentication for LVT transaction.A method to check if the wallet PIN has been previously set.- Returns:
- True to always ask for a wallet pin on LVT. False if wallet pin skipped on LVT.
- Throws:
WalletPinException
-
getRemainingRetries
public int getRemainingRetries() throws WalletPinException
An API to get the number of remaining retries for invalid wallet PIN entry.- Returns:
- number of remaining retries.
- Throws:
WalletPinException
-
-