Hints
In-App Provisioning
Simple explanation how to use methods of the SDK.
Check the presence of the card in the wallet
-
If you do not have cached
primaryAccountIdentifier
, then you need to callMeaPushProvisioning.initializeOemTokenization
to get it. -
Check value of
primaryAccountIdentifier
:-
primaryAccountIdentifier
does not exist: Card was not added to Wallet. -
primaryAccountIdentifier
is obtained:-
Try to use
MeaPushProvisioning.canAddSecureElementPass(withPrimaryAccountIdentifier: primaryAccountIdentifier)
/MeaPushProvisioning.canAddPaymentPass(withPrimaryAccountIdentifier: primaryAccountIdentifier)
method to check ability to add to iPhone Wallet. -
if watch is paired, try to use
MeaPushProvisioning.remoteSecureElementPassExists(withPrimaryAccountIdentifier: primaryAccountIdentifier)
/MeaPushProvisioning.remoteSecureElementPassExists(withPrimaryAccountIdentifier: primaryAccountIdentifier)
method to check ability to add to iPhone Wallet.
-
-
-
Show button if:
-
there is no
primaryAccountIdentifier
. -
primaryAccountIdentifier
exists but card can be added to one of devices (iphone or watch).
-
Add card to wallet
-
Use
addPaymentPassRequestConfiguration
fromMeaPushProvisioning.initializeOemTokenization
result. -
Set
addPaymentPassRequestConfiguration.cardholderName
-
Set
addPaymentPassRequestConfiguration.primaryAccountIdentifier
from cache or fromMeaPushProvisioning.initializeOemTokenization
result (if it is not set yet). -
Get
paymentPassController
:
let paymentPassController = PKAddPaymentPassViewController.init(requestConfiguration: addPaymentPassRequestConfiguration!, delegate: self)
-
Present
paymentPassController
with.present(...)
method of current controller. Read more -
Delegate should implement
PKAddPaymentPassViewControllerDelegate
protocol to callcompleteOemTokenization:completionHandler:
method, once the data is exchangedPKAddPaymentPassRequest
is passed to the handler to add the payment card to Apple Wallet. In the end and delegate method is invoked to inform you if request has succeeded or failed. Read more
Extension
Read here what to do in general
Notes
IssuerExtensionHandler.status(...)
may returnrequiresAuthentication = false
all the time, then you may have base implementation ofIssuerAuthorizationExtensionHandler
. But in this case you need to transferaccess/refresh token
(need it to load cards data from your BE) to extension viaapp group
anduser defaults
or with other methods
Updated about 1 year ago