         print(debug: "safariViewControllerDidFinish")
         dismissIndicator()
         enableSubmitButton()
-    }
-}
+        tdsSecureProcessing = false
+    }
+}

        if tdsSecureProcessing {
            tdsSecureProcessing = false
            if let tdsToken = presenter?.tdsToken {
                presenter?.fetchToken(tdsToken: tdsToken)
            }
        }
    }

    }

    func presentVerificationScreen(with tdsToken: ThreeDSecureToken) {
        let safariVc = SFSafariViewController(url: tdsToken.tdsEntryUrl)
        if #available(iOS 11.0, *) {
            safariVc.dismissButtonStyle = .close
        }
        safariVc.delegate = self
        self.present(safariVc, animated: true, completion: nil)
        tdsSecureProcessing = true
    }

    func didCompleteCardForm(with result: CardFormResult) {
