This method allows you get a new instance of NolPayLinkCardComponent that can be used to link new Nol Pay cards.

1
fun provideNolPayLinkCardComponent(viewModelStoreOwner: ViewModelStoreOwner): NolPayLinkCardComponent
kotlin
copy

Parameters

viewModelStoreOwner
ViewModelStoreOwnerRequired

The ViewModelStoreOwner to associate with the component.

Returns

An instance of NolPayLinkCardComponent.

NolPayLinkCardComponent
Initialize the component by calling the start function. This method should be called only once.

Update component with collected data by passing implementations of sealed interface representing collectable data for linking a Nol Pay card. This method can be called at any point, even if you have only partially collected data. To validate the partially collected data, you can refer to the componentValidationStatus and receive the validation status when it's updated.

sealed interface NolPayLinkCollectableData

Data class representing Nol Pay tag data collected during the linking process.

Properties
tag
Tag

An NFC tag decoded using NolPayNfcComponent.

Data class representing Nol Pay phone data collected during the linking process.
Properties

The mobile number in E.164 format to associate the Nol Pay payment card with.

Data class representing Nol Pay OTP (One-Time Password) data collected during the linking process.
Properties
The OTP code required for card linking.

Call submit function in order to process collected data and move component to next state.

NolPayLinkCardStep is a class holding different output data for specific steps. Whenever start or submit methods are called,componentStep will trigger the next step in case the call to the mentioned method was successful.

sealed interface NolPayLinkCardStep

Object representing the step of collecting tag data for Nol Pay card linking.

A data class representing the step of collecting phone data for Nol Pay card linking.
Properties

The card number associated with the Nol Pay card scanned in CollectTagData step.

A data class representing the step of collecting OTP (One-Time Password) data for Nol Pay card linking.
Properties

The mobile number to which OTP code was sent to.

A data class representing the step of successfully linking a Nol Pay card
Properties
nolPaymentCard
PrimerNolPaymentCard

The linked Nol Pay card.

The PrimerValidationStatus interface encompasses a range of validation statuses.

sealed interface PrimerValidationStatus
Indicates that data is currently in the process of being validated.
Properties
collectableData
NolPayLinkCollectableData

The data being validated.

Indicates that the data has successfully been validated.
Properties
collectableData
NolPayLinkCollectableData

The successfully validated data.

Indicates that the data has been considered invalid after validation.
Properties
validationErrors
List<PrimerValidationError>

List of PrimerValidationError objects that represent data validation errors emitted by this component.

Properties
errorId
StringRequired
A unique error identifier.
description
StringRequired
A error description.
diagnosticsId
StringRequired
A unique diagnostics id for the given error.
collectableData
NolPayLinkCollectableData

The data that failed validation.

Represents the status when an error occurred during the validation process.
Properties
error
PrimerError

The specific PrimerError that occurred during validation.

errorId
StringRequired
A unique error identifier.
errorCode
String?
A unique error code.
description
StringRequired
A error description.
A recovery suggestion for the given error. In case it's present, use it to try to recover from error.
diagnosticsId
StringRequired
A unique diagnostics id for the given error.
collectableData
NolPayLinkCollectableData

The data for which the error occurred.

Get a Flow of PrimerError objects that represent errors emitted by this component. Subscribers can observe and handle errors using this Flow.