-
Notifications
You must be signed in to change notification settings - Fork 994
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
Improve expiration date scanning #4719
base: master
Are you sure you want to change the base?
Conversation
🚨 New dead code detected in this PR: STPCardScanner.swift:362 warning: Function 'handlePossibleExpirationDate(_:)' is unused Please remove the dead code before merging. If this is intentional, you can bypass this check by adding the label ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with |
StripePaymentsUI/StripePaymentsUI/Source/Helpers/STPStringUtils.swift
Outdated
Show resolved
Hide resolved
StripePaymentSheet- public var link: StripePaymentSheet.PaymentSheet.LinkConfiguration
- }
- public struct LinkConfiguration {
- public var display: StripePaymentSheet.PaymentSheet.LinkConfiguration.Display
- public enum Display : Swift.String {
- case automatic
- case never
- public init?(rawValue: Swift.String)
- public typealias RawValue = Swift.String
- public var rawValue: Swift.String {
- get
- }
- }
- public init(display: StripePaymentSheet.PaymentSheet.LinkConfiguration.Display = .automatic) If you are adding a new public API consider the following:
If you are modifying or removing a public API:
If you confirm these APIs need to be added/updated and have undergone necessary review, add the label ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with |
Summary
Due to improvements in iOS' OCR and changes to modern cards, we're often seeing strings like
Valid Thru 01/30 Security Code 123
, which are not parsed by the existing logic. To catch these, we'll add another check to look for dates in a "00/00" format.Before: 5/14 test cards successfully populated an expiration date on scan
After: 14/14 test cards succeeded. Scanning was marginally faster, as we don't have to wait for the timeout
Motivation
https://jira.corp.stripe.com/browse/MOBILESDK-3369
Testing
Tested on iPhone 16 Pro, iOS 18.3.2
Changelog
Adding