Contactless PIN Decider
Overview
There are plugins which can be installed in the readers SDK in order to request or not request pin in contactless transactions. You can also create new implementations of this decider.
The existing plugins are: SDKForcePinDeciderDeciderPlugin
and SDKBinCvmContactlessDeciderPlugin
.
SDKForcePinDeciderDeciderPlugin
Is a plugin that receives a boolean to decide if force pin or not, if it is sent in true it requests pin in all contactless transactions, otherwise it does not request pin.
SDKBinCvmContactlessDeciderPlugin
Is designed to decide whether to request a pin based on a bin and cvm limit. For a bin, if the amount of the transaction is greater than or equal to the cvm limit set for that bin, a pin is requested. In case the bin does not exist in the list or it exists and the amount of the transaction is less than the set cvm limit, the pin request is handled by the card reader configuration and the card capabilities.
To set the cvm limits to each bin, an SDKBinTable
must be passed when the plugin is created, a map from SDKBin
to an SDKMoney
must be set to this.
val sdkBinTable = SDKBinTable()
sdkBinTable.set(
mapOf(
SDKBin("12345678") to SDKMoney(10.toBigDecimal(), SDKCurrency.ars())
)
)
Sending contactless pin deciders to sdk
The deciders are sent as plugins in SDKPaymentsConfiguration
as follows:
val sdkPaymentsConfiguration = SDKPaymentsConfiguration.Builder()
.build(
....
pluginInstallers = setOf(
SDKBinCvmContactlessDeciderPlugin.getInstaller(sdkBinTable),
SDKForcePinDeciderDeciderPlugin.getInstaller(forcePin = true)
)
...
)
SDKPayments.init(sdkPaymentsConfiguration)