Alipay+ DocsAlipay+ Docs

suspendService

Call the suspendService API to pause all services and suspend all tokens, including those added to Apple Wallet.

Method signature

copy
public static func suspendService(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 suspendService API.

Response parameters

N/A

Sample

copy
IAPApplePay.suspendService { result in
    switch result {
    case .success(let suspended):
        print("suspend success: \(suspended)")
    case .failure(let error):
        print("suspend failed: \(error)")
    }
}