Set the PrimerHeadlessUniversalCheckoutRawDataManagerListener
in order to receive different
callbacks from Primer SDK.
1 fun onValidationChanged ( isValid : Boolean , errors : List < PrimerInputValidationError > ) kotlin
copy
Returns whether the rawData
set by setRawData is valid, and all
the errors that occurred during validation.
Returns true
in case raw data is valid, otherwise false
.
Returns all of the validation errors for a raw data.
Properties A unique error identifier.
An error description.
A input element associated with the error returned.
A unique diagnostics id for the given error.
Returns metadata for the current data set by using the setRawData .
This synchronous callback provides immediate metadata updates based on internal SDK calculations.
Check the section below for the metadata types that can be returned.
1 fun onMetadataChanged ( metadata : PrimerPaymentMethodMetadata ) kotlin
copy
Returns metadata state for the current data set by using
the setRawData .
In contrast to onMetadataChanged
, this callback involves internal asynchronous operations,
offering a broader and more accurate dataset that can be fetched remotely.
Its dynamic nature enables you to access the current state of SDK operations,
providing an opportunity to tailor the UI accordingly.
Check the section below for the metadata state types that can be returned.
1 fun onMetadataStateChanged ( metadataState : PrimerPaymentMethodMetadataState ) kotlin
copy
direct subclasses Properties The state of card number entry triggered the metadata fetch.
Properties The entered card number.
Properties The state of card number entry triggered the metadata fetch.
Properties The entered card number.
Represents metadata for PrimerCardNumberEntry, including selectable (co-badged) and detected card networks.
Properties Selectable card networks for a given card number, will be null in case card network is not co-badged.
Properties Represents a card network with metadata including display name, network type, and whether it is allowed.
The type of card network (e.g., VISA, MASTERCARD).
The human-readable name of the card network (e.g., Visa, Mastercard).
A boolean indicating whether this card network is allowed.
Represents a card network with metadata including display name, network type, and whether it is allowed.
The type of card network (e.g., VISA, MASTERCARD).
The human-readable name of the card network (e.g., Visa, Mastercard).
A boolean indicating whether this card network is allowed.
All detected card networks for a given card number.
Properties Represents a card network with metadata including display name, network type, and whether it is allowed.
The type of card network (e.g., VISA, MASTERCARD).
The human-readable name of the card network (e.g., Visa, Mastercard).
A boolean indicating whether this card network is allowed.
Represents a card network with metadata including display name, network type, and whether it is allowed.
The type of card network (e.g., VISA, MASTERCARD).
The human-readable name of the card network (e.g., Visa, Mastercard).
A boolean indicating whether this card network is allowed.
Enum class representing the source of validation for card metadata.
cases The data comes from Primer API.
The data comes from the SDK if Primer's server fails to be reached. This works similarly to LOCAL.
The data comes from the SDK, usually by levering the first few digits.