set Forage Config
⚠️ The setForageConfig method is only valid for online-only transactions. Use setPosForageConfig for in-store POS Terminal transactions.
Sets the necessary ForageConfig configuration properties for a ForageElement. setForageConfig must be called before any other methods can be executed on the Element.
// Example: Call setForageConfig on a ForagePANEditText Element
val onlineOnlyForagePanEditText = root?.findViewById<ForagePANEditText>(
R.id.tokenizeForagePanEditText
)
onlineOnlyForagePanEditText.setForageConfig(
ForageConfig(
merchantId = "mid/<merchant_id>",
sessionToken = "<session_token>"
)
)
Content copied to clipboard
Parameters
forage Config
A ForageConfig instance that specifies a merchantId
and sessionToken
.
See also
setPosForageConfig for the equivalent Terminal SDK method.