Configuration and Utility Events (iPhone)

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.

Take Your Business to the Next Level

Find out how our innovative payment solutions can benefit your business. Reach out to us for more information or to get started!

Let's Get Started