Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overridden errorImage(for:) & cvcImage(for:) is not called in subclass of STPPaymentCardTextField #1886

Closed
ShengYuenIW opened this issue Oct 15, 2021 · 2 comments
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@ShengYuenIW
Copy link

Summary

Overridden method open class func errorImage(for cardBrand: STPCardBrand) -> UIImage? & open class func cvcImage(for cardBrand: STPCardBrand) -> UIImage? is not called in subclass of STPPaymentCardTextField

Code to reproduce

import Stripe
import UIKit

final class PaymentCardTextField: STPPaymentCardTextField {
    override class func errorImage(for cardBrand: STPCardBrand) -> UIImage? {
        return nil
    }

    override class func cvcImage(for cardBrand: STPCardBrand) -> UIImage? {
        return nil
    }
}

iOS version

iOS 15

Installation method

Cocoapods

SDK version

21.8.1

Other information

line 1809 & 1818
should be Self.errorImage(for: ) instead of STPPaymentCardTextField.errorImage(for:).

same issue as #1827.

@porter-stripe
Copy link
Collaborator

Hi @ShengYuenIW sorry for the build issue. We are working on a fix and hope to have it in the next release.

Thanks!

@porter-stripe porter-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Oct 25, 2021
@porter-stripe
Copy link
Collaborator

We fixed this in version 21.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

2 participants