-
Notifications
You must be signed in to change notification settings - Fork 992
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
Fix logic for when editing is available for update #4676
Conversation
$0.isCoBrandedCard && cbcEligible | ||
}) | ||
default: | ||
return configuration.paymentMethodRemove || viewModels.contains(where: { | ||
return configuration.paymentMethodRemove || configuration.paymentMethodUpdate || configuration.paymentMethodSyncDefault || viewModels.contains(where: { |
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.
Looks like we forgot to add paymentMethodSyncDefault
here, so adding it in addition to paymentMethodUpdate
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.
CustomerSheet is actually a special case— paymentMethodSyncDefault is not a factor in whether a pm can be edited in CustomerSheet because we don't show a default checkbox. For CustomerSheet, we set it as default when a payment method is selected and confirmed.
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.
Ah! Right!!! Oops. Will change that back! Thanks for catching.
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.
🚢
Summary
Allows users who have integrated with CustomerSessions to update cards if they have paymentmethodRemove || paymentmethodDefault set to disabled.
Motivation
Currently updating cards is only available if you enable paymentMethodDefault or paymentmethodRemove.
Testing
updated existing tests and manually tested
Changelog