Configuration and Utility Events — iPhone
protocol CyoGateDelegate: AnyObject {
func transactionDidComplete(_ result: CyoGateTransactionResult)
func transactionDidFail(_ error: CyoGateError)
func sdkSessionDidInitialize()
func sdkSessionDidExpire()
func networkConnectivityChanged(_ isConnected: Bool)
func nfcReadingDidBegin()
func nfcReadingDidEnd()
}
extension CheckoutViewController: CyoGateDelegate {
func transactionDidComplete(_ result: CyoGateTransactionResult) {
DispatchQueue.main.async {
if result.isApproved { self.showReceipt(transactionID: result.transactionID) }
else { self.showDeclineMessage(result.responseText) }
}
}
func nfcReadingDidBegin() { statusLabel.text = "Hold card near top of phone" }
func nfcReadingDidEnd() { statusLabel.text = "" }
}
See the Tap to Pay on iPhone overview for full context and the complete topic list.