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.initializeOemTokenization
to get it. - Check the
primaryAccountIdentifier
value:primaryAccountIdentifier
doesn't exist: The card hasn't been added to Wallet.primaryAccountIdentifier
exists:- 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
. primaryAccountIdentifier
exists but the card can be added to at least one device (iPhone or Watch).
- There's no
Add card to wallet
- Use
addPaymentPassRequestConfiguration
from theMeaPushProvisioning.initializeOemTokenization
result. - Set
addPaymentPassRequestConfiguration.cardholderName
- Set
addPaymentPassRequestConfiguration.primaryAccountIdentifier
from cache or from theMeaPushProvisioning.initializeOemTokenization
result (if not already set). - Get the
paymentPassController
:
let paymentPassController = PKAddPaymentPassViewController.init(requestConfiguration: addPaymentPassRequestConfiguration!, delegate: self)
- Present the
paymentPassController
using the current controller's.present(...)
method. Read more - Your delegate should implement the
PKAddPaymentPassViewControllerDelegate
protocol to call thecompleteOemTokenization:completionHandler:
method. Once the data is exchanged,PKAddPaymentPassRequest
gets 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 group
combined withUserDefaults
or alternative methods.
Updated 14 days ago