#bachir_unexpected
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1220298345755447336
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- bachir_error, 1 day ago, 15 messages
related code:
<Grid container>
<DisplayGrid when={Boolean(paymentError)} item xs={12} marginBottom={2}>
<PaymentErrorAlert paymentError={paymentError} />
</DisplayGrid>
{!expressCheckoutDisabled && (
<DisplayGrid when={displayExpressCheckout} item container xs={12} marginBottom={3}>
<Grid item xs={12} marginBottom={3}>
<StripeExpressCheckoutElement
// To avoid any issues with express checkout not loading we use the key prop
// to force the express checkout component to re-initialize when it's shown/hidden
key={displayExpressCheckout ? "show" : "hide"}
id="express-checkout-element"
// We remove the onReady callback to avoid triggering this callback when hiding the component
onReady={!prioritizeBankPayment ? handleExpressCheckoutReady : undefined}
onLoadError={handleExpressCheckoutLoadError}
onConfirm={handleExpressCheckoutConfirm}
onClick={handleExpressCheckoutClick}
/>
</Grid>
<Grid container item xs={12} alignItems="center" justifyContent="space-between">
<Grid item xs>
<Divider />
</Grid>
<Grid item marginRight={2} marginLeft={2}>
<Typography variant="subtitle2" className={styles.expressSeparator}>
{t("common:payment.express.payAnotherWay")}
</Typography>
</Grid>
<Grid item xs>
<Divider />
</Grid>
</Grid>
</DisplayGrid>
)}
hi! cna you put a minimal example of this up on a site somewhere where can replicate?
it's probably a React state bug in your overall code leading to destroying the DOM that contains the Element.
and before I get into this, you are a developer at Zeffy right?
hi, yes!
I'm not sure I can easily as this is a proprietary code, I thought it could be enough if you try on the form https://www.zeffy.com/en-US/ticketing/a6f2d814-9a13-4832-8bbf-35d816d56db9 and reproduce the steps in the loom ?
ΚΔΡ Lambda Centennial CelebrationFriday, April 12, 2024 at 6:00 p.m.Heyns Room, The Faculty ClubUniversity of California, Berkeley, Minor Ln, Berkeley, CA 94720$125 includes dinner and drinksPlease RSVP by March 27Donations are welcome and encouraged, please read below.Forward this announcement to your KDR classmates to make sure that they know ...
Otherwise I can look into replicating in a minimal example
I can reproduce it yes but it's a bit hard to say much without being able to play with the overall React code myself with all your business logic
it seems like this only happens when the amount goes over a certain amount? So maybe you have some logic involved there?
we also have a feature to tune payment methods by amount
I suspect that's what you're using
https://docs.stripe.com/payments/payment-method-targeting#set-targeting-conditions I'm relatively certain you're using that and when the amount is over $10k you turn off card payments(which includes the ECE) and only allow ACH
We indeed havd the dynamic payment methods activated, but we also set the paymentMethodTypes when instantiating the Payment Element, and update it when the amount changes:
elements?.update({ paymentMethodTypes: ["us_bank_account"] });
Do you think doing both (dynamic pm from dashboard + setting paymentMethodTypes) can lead to issues ?
well I mean the problem is what you said
I'm taking a look and see if we can integrate this instead of doing it manually in our code
you change paymentMethodTypes to just ACH , so that means ECE won't render
put aside the dynamic dashboard feature actually, I see you're not using it
as you say , you do your own logic for it. But then that's the issue really.
no card means no ECE
AFAIK you can listen to https://docs.stripe.com/js/element/events/on_ready#element_on_ready-handler-availablePaymentMethods and based on that clean up the UI on your page(remove that "or pay another way" seperator or show a note that only ACH is allowed for amounts over X)
How can we activate it ? I'm seeing a default config but I thought that meant it is
though you don't really need that event if you're explicitly passing paymentMethodTypes: ["us_bank_account"]
I'm not sure it's fully GA yet, I think they're doing a partial rollout
anyway you can ignore it, you're not using it, I was mistaken and I didn't have all the context you have about your actual business logic that sets paymentMethodTypes , so I was just making an educated guess