-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hiding messaging when external payments are provided #1425
Hiding messaging when external payments are provided #1425
Conversation
Adding a blank message in case we want to put something there Updating store names to match what they're doing now
Fetching the info from the initial loading of tenant data
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.
Approved with suggestions.
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.
Is there a reason why this component shouldn't return null
when an external payment method is detected? The argument I would make against returning null
in this scenario is to more easily accommodate external payment method messaging in the future.
The only minor oddity with the current approach is that the loading state will still be displayed when externalPaymentMethod
is true
despite the message not having any content.
return !tenantBillingDetails | ||
? false | ||
: tenantBillingDetails.some((tenantBillingDetail) => { | ||
return ( | ||
tenantBillingDetail.tenant === selectedTenant && | ||
tenantBillingDetail.payment_provider === 'external' | ||
); | ||
}); |
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.
Is there a benefit to using a ternary as opposed to the nullish coalescing operator?
Issues
contributes to #1419
Changes
1419
external
payment providerTests
Manually tested
stripe
andexternal
payment tenantsAutomated tests
Playwright tests ran locally
Screenshots
stripe
payment for tenantexternal
payment for tenant