TPCSDKProvisionDelegate
@objc
public protocol TPCSDKProvisionDelegate : NSObjectProtocol
Methods that let the system inform you when a push provisioning request has succeeded or failed.
-
Callback when provision process from PassKit is complete
TPCError.notConfigured
TPCError.invalidArgument
TPCError.invalidFormat
TPCError.serverError
Error
Returns directly from Apple Pay API. Please check the details here https://developer.apple.com/documentation/passkit/pkaddpaymentpassviewcontrollerdelegate/1615942-addpaymentpassviewcontroller
func onProvisionCompletion(pass: PKPaymentPass?, error: Error?) { if let error = error { if let tpcError = error as? TPCError { // handle TPCError } else { // handle Apple Pay Error } } else if let pass = pass { // handle successful result with pass object } }
Declaration
Swift
func onProvisionCompletion(pass: PKPaymentPass?, error: Error? )
Parameters
pass
Payment pass created on device, nil if operation failed
error
This method returns two possible types of errors: TPCError, which is returned from the SDK, and Error, which is returned directly from ApplePay API.