D1IssuerProvisioningExtensionHandler
open class D1IssuerProvisioningExtensionHandler : PKIssuerProvisioningExtensionHandler
Class that extends system API D1IssuerProvisioningExtensionHandler and implements required functions.
By extending D1IssuerProvisioningExtensionHandler
, developer need not implement
the required functions.
Optionally, developer could override D1IssuerProvisioningExtensionHandler.errorEncountered(_:)
to receive errors
encountered by SDK.
It is prequisite that Wallet Extension must be configured in application
by calling D1Task.configure(_:completion:)
with
ConfigParams.walletExtensionConfig(cardParamsList:appGroupID:)
and
ConfigParams.coreConfig(consumerID:)
.
Since
3.3.0-
Implement abstract function status(completion:) to report Wallet Extension status.
Declaration
Swift
override open func status(completion: @escaping (PKIssuerProvisioningExtensionStatus) -> Void)
Parameters
completion
SDK call the completion with computed PKIssuerProvisioningExtensionStatus, based on Apple Wallet Extension configuration in the application.
-
Implement abstract function passEntries(completion:) to provide the list of card to be digitized on device.
Declaration
Swift
override open func passEntries(completion: @escaping ([PKIssuerProvisioningExtensionPassEntry]) -> Void)
Parameters
completion
SDK call the completion with list of PKIssuerProvisioningExtensionPassEntry yet to be digitized on device.
-
Implement abstract function remotePassEntries(completion:) to provide the list of card to be digitized on Apple Watch.
Declaration
Swift
override open func remotePassEntries(completion: @escaping ([PKIssuerProvisioningExtensionPassEntry]) -> Void)
Parameters
completion
SDK call the completion with list of PKIssuerProvisioningExtensionPassEntry yet to be digitized on Apple Watch.
-
generateAddPaymentPassRequestForPassEntryWithIdentifier(_:
configuration: certificateChain: nonce: nonceSignature: completionHandler: ) Implement abstract function generateAddPaymentPassRequestForPassEntryWithIdentifier(_:configuration:certificateChain:nonce:nonceSignature:completionHandler:) to prepare payload required to digitize card.
Declaration
Swift
override open func generateAddPaymentPassRequestForPassEntryWithIdentifier( _ identifier: String, configuration: PKAddPaymentPassRequestConfiguration, certificateChain certificates: [Data], nonce: Data, nonceSignature: Data, completionHandler completion: @escaping (PKAddPaymentPassRequest?) -> Void )
Parameters
identifier
cardID as card identifier.
configuration
configuration used by system to digitize the card.
certificates
Certificate provided by system. SDK send this to server to obtain the push payload.
nonce
A signature generated by Apple. SDK send this to server to obtain the push payload.
nonce
A signature generated by Apple. SDK send this to server to obtain the push payload.
completion
SDK call the completion with push payload.
-
This function is called when there is any error encountered by SDK during status(completion:), passEntries(completion:), remotePassEntries(completion:), generateAddPaymentPassRequestForPassEntryWithIdentifier(_:configuration:certificateChain:nonce:nonceSignature:completionHandler:).
Developer should override this function to receive errors encountered by SDK.
Possible errors:
Declaration
Swift
open func errorEncountered(_ error: D1Error)