createStaticToken
Call the createStaticToken API to create a static token for the current user.
Method signature
copy
public static func createStaticToken(completion: @escaping (Result<Bool, IAPAPErrors>) -> Void)Request parameters
Parameter | Type | Required | Description |
completion | (Result<Bool, IAPAPErrors>) -> Void | Yes | An asynchronous completion callback that returns the result of calling the createStaticToken API. |
Response parameters
N/A
Sample
copy
IAPApplePay.createStaticToken { result in
switch result {
case .success(let isSuccess):
print("Create static token success: \(isSuccess)")
case .failure(let error):
print("Create static token error: \(error.localizedDescription)")
}
}