-
Notifications
You must be signed in to change notification settings - Fork 663
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
Support Expiration Date Changes #10568
base: master
Are you sure you want to change the base?
Conversation
Diffuse output:
APK
DEX
|
41d38df
to
0d35066
Compare
0d35066
to
6742926
Compare
f648308
to
905245b
Compare
val availableNetworks: List<CardBrandChoice> | ||
val expiryDateEditEnabled: Boolean, | ||
val availableNetworks: List<CardBrandChoice>, | ||
val dateValidator: (String) -> TextFieldState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if we avoid passing functions through the state unless necessary. Validating the date within the UI feels like the wrong solution.
@@ -9,6 +10,8 @@ import com.stripe.android.paymentsheet.CardUpdateParams | |||
*/ | |||
internal data class CardDetailsEntry( | |||
val cardBrandChoice: CardBrandChoice, | |||
val expMonth: Int? = null, | |||
val expYear: Int? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than nullable parameters, can we make a ExpiryDateState
that encompassed the DateConfig
? You build something similar for Cvc Recollection
for CvcState that I think works better.
expMonth = map[IdentifierSpec.CardExpMonth]?.value?.toIntOrNull()?.takeIf { it > 0 }, | ||
) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the comment above, can the state itself parse out the string and digest this?
# Conflicts: # paymentsheet/src/test/java/com/stripe/android/model/PaymentMethodFixtures.kt
� Conflicts: � paymentsheet/src/main/java/com/stripe/android/paymentsheet/ui/EditCardDetailsInteractor.kt � paymentsheet/src/test/java/com/stripe/android/paymentsheet/ui/DefaultEditCardDetailsInteractorTest.kt
Update EditCardDetailsInteractor.kt Remove callback from interface rename factory Update UpdatePaymentMethodInteractor.kt Update UpdatePaymentMethodInteractor.kt Update FakeEditCardDetailsInteractor.kt Refactor factory Fix tests Update UpdatePaymentMethodInteractor.kt Fix tests Fix factory Update FakeEditCardDetailsInteractor.kt Update DefaultEditCardDetailsInteractorTest.kt temp more tests
Update ExpiryDateState.kt
3cef83e
to
a6b1cab
Compare
Summary
Support expiry date changes. This feature is controlled by a local feature flag.
Motivation
JIRA
Testing
Screenshots
Screen.Recording.2025-04-07.at.12.22.37.PM.mov
Changelog