This method allows you get a new instance of NolPayUnlinkCardComponent that can be used to unlink existing Nol Pay cards.

1
func provideNolPayUnlinkCardComponent() -> NolPayUnlinkCardComponent
swift
copy

Returns

An instance of NolPayUnlinkCardComponent.

NolPayUnlinkCardComponent
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 unlinking 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 validationDelegate

enum NolPayUnlinkCollectableData

Data class representing Nol Pay card and phone data for unlinking.

Properties
nolPaymentCard
PrimerNolPaymentCard

The Nol Pay payment card to unlink is retrieved using NolPayLinkedCardsComponent.

The mobile number in E.164 format for which linked cards are to be retrieved.

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

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

NOTE: For LinkCardComponent you must call this function as a first step, to start NFC scanning of the card.

stepDelegate
PrimerHeadlessSteppableDelegate

NolPayUnlinkDataStep is a enum class holding different output data for specific steps. Whenever submit method is called, stepDelegate will trigger the next step in case the call to the mentioned method was successful.

enum NolPayUnlinkDataStep

Enum member representing the step of collecting tag data for Nol Pay card linking. This is a default/first step for linking flow. To start the linking flow you will have to call submit function after you called start function.

Enum member representing the step of collecting card and phone data for Nol Pay payment.
Enum member representing the step of collecting OTP (One-Time Password) data for Nol Pay card linking.
Enum member representing the step of successfully unlinking a Nol Pay card
1
func didReceiveStep(step: PrimerHeadlessStep)
swift
copy
validationDelegate
PrimerHeadlessValidatableDelegate
Validation delegate will be triggered every time collected data is updated.
1
func didUpdate(validationStatus: PrimerValidationStatus, for data: PrimerCollectableData?)
swift
copy

PrimerValidationStatus is an enum that represents the different validation statuses in the Primer SDK. It helps to communicate the state of validation for a particular process, providing clear categorization of validation states.

enum PrimerValidationStatus
Enum case representing the ongoing validation state. This indicates that the validation process is currently in progress.
Enum case representing a successful validation state. This indicates that the validation process has completed successfully and the data is valid.
Enum case representing an unsuccessful validation state due to validation errors. This indicates that the validation process has completed but has found one or more errors in the data.
Associated Value
errors
[PrimerValidationError]
An array of `PrimerValidationError` representing the specific validation errors found.
Enum case representing an error state due to an unexpected issue. This indicates that an unexpected error has occurred during the validation process.
Associated Value
error
PrimerError
A `PrimerError` representing the unexpected error that occurred.
errorDelegate
PrimerHeadlessErrorableDelegate
Error delegate will be triggered every time an error is thrown in the process.
1
func didReceiveError(error: PrimerError)
swift
copy