我在PKPaymentAuthorizationViewControllerDelegate
中调用了函数
func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion: @escaping (PKPaymentAuthorizationStatus) -> Void) {
onError: { completion(.failure) },
onComplete: { completion(.success) } }
,如果交易完成,paymentAuthorizationViewControllerDidFinish
将收到呼叫以关闭Apple Pay对话框。但是,如果用户也按“取消”按钮将其关闭,则有一个例外。
是否有任何方法可以从paymentAuthorizationViewController
中的paymentAuthorizationViewControllerDidFinish
获取回调结果?还是可以知道是否按下了取消按钮?