Hints
In-App Provisioning
Simple explanation of how to use the SDK methods.
Check the presence of the card in the wallet
- If you don't have a cached
primaryAccountIdentifier, callMeaPushProvisioning.initializeOemTokenizationto get it. - Check the
primaryAccountIdentifiervalue:primaryAccountIdentifierdoesn't exist: The card hasn't been added to Wallet.primaryAccountIdentifierexists:- Use
MeaPushProvisioning.canAddSecureElementPass(withPrimaryAccountIdentifier: primaryAccountIdentifier)/MeaPushProvisioning.canAddPaymentPass(withPrimaryAccountIdentifier: primaryAccountIdentifier)to check if the card can be added to iPhone Wallet. - If a watch is paired, use
MeaPushProvisioning.remoteSecureElementPassExists(withPrimaryAccountIdentifier: primaryAccountIdentifier)/MeaPushProvisioning.remotePaymentPassExists(withPrimaryAccountIdentifier: primaryAccountIdentifier)to check if the card can be added to Apple Watch.
- Use
- Show the button if:
- There's no
primaryAccountIdentifier. primaryAccountIdentifierexists but the card can be added to at least one device (iPhone or Watch).
- There's no
Add card to wallet
- Use
addPaymentPassRequestConfigurationfrom theMeaPushProvisioning.initializeOemTokenizationresult. - Set
addPaymentPassRequestConfiguration.cardholderName - Set
addPaymentPassRequestConfiguration.primaryAccountIdentifierfrom cache or from theMeaPushProvisioning.initializeOemTokenizationresult (if not already set). - Get the
paymentPassController:
let paymentPassController = PKAddPaymentPassViewController.init(requestConfiguration: addPaymentPassRequestConfiguration!, delegate: self)- Present the
paymentPassControllerusing the current controller's.present(...)method. Read more - Your delegate should implement the
PKAddPaymentPassViewControllerDelegateprotocol to call thecompleteOemTokenization:completionHandler:method. Once the data is exchanged,PKAddPaymentPassRequestgets passed to the handler to add the payment card to Apple Wallet. Finally, a delegate method tells you whether the request succeeded or failed. Read more
Extension
Read here for general implementation details
Notes
IssuerExtensionHandler.status(...)can always returnrequiresAuthentication = false, enabling you to create a basic implementation ofIssuerAuthorizationExtensionHandler. However, you'll need to transfer youraccess/refresh token(required to fetch card data from your backend) to the extension using anapp groupcombined withUserDefaultsor alternative methods.
Updated 3 months ago
