checkout / frames-ios

Frames iOS: making native card payments simple

Home Page:https://www.checkout.com/docs/integrate/sdks/ios-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CardViewController never fire failure

Oleygen opened this issue · comments

func onTapDoneCardButton() triggers onTapDone() delegate method, which never gets .failure as a parameter, check line 202 of CardViewController

Hi @Oleygen sorry for the late reply. We addressed this in a release by handling the failure scenario in CardViewController:

checkoutApiClient.createCardToken(card: card) { result in
            switch result {
            case .success(let cardTokenResponse):
                self.delegate?.onTapDone(controller: self, cardToken: cardTokenResponse, status: .success)

            case .failure:
                self.delegate?.onTapDone(controller: self, cardToken: nil, status: .failure)
            }
        }

If you still experience this bug please feel free to re-open this issue with repro steps. Thanks.