class VerifyAddFlowViewController: UIViewController, VerifyCardExplanationResult, VerifyCardAddResult {
@IBAction func buttonPressed() {
let vc = VerifyCardAddViewController(userId: self.currentUser.userId)
vc.cardAddDelegate = self
// only use this if you're using a "default to scan" flow
vc.enableManualEntry = true
viewController.present(vc, animated: true, completion: nil)
// MARK: -VerifyCardAddResult protocol implementation
func userDidCancelCardAdd(_ viewController: UIViewController) {
func userDidScanCardAdd(_ viewController: UIViewController, creditCard: CreditCard) {
// Add the card details in `creditCard` to your card entry form
func userDidPressManualCardAdd(_ viewController: UIViewController) {
// The user pressed the "enter details manually" button
// navigate to your card entry form without filling in details