#ubi-elements-amountchange

1 messages · Page 1 of 1 (latest)

true bisonBOT
copper mountain
tired surge
#

Hey @copper mountain what do you call "re-rendering"?

copper mountain
#

That is the UI, the problem is that when I enter the Address, I hit the backend to recalculate the amount, therefore, the amount changes and cause some issues

tired surge
#

the part on the right is not Elements, it's your own UI/code right?

copper mountain
#

Right, custom stuff around it

tired surge
#

Are you updating the underlying PaymentIntent on the back end?

copper mountain
#

Nope, I am using confirm: true so not intent in the backend

#

I am just purely collecting the payment method at this point to confirm in the backend

tired surge
#

what does "I am using confirm: true" mean?

#

that's not a term I've ever heard. Which doc are you following?

copper mountain
#
Stripe.PaymentIntent.create(%{
      confirm: true,
      error_on_requires_action: true,
      amount: tax_calculation.amount_total,
      # ...
    })
#

Like when you pass confirm: true to the payment intent create API

tired surge
#

I'm not sure how that's relevant

#

How do you render PaymentElement there on that UI?

copper mountain
#

payment intent isn't relevant to my existing code is what I tried to say... sorry

tired surge
#

No problem! We have like 7 ways to integrate that one element and we each use a different vocabulary for it so that's not easy

#

can you share the code where you initialize that UI for the card details?

#

ubi-elements-amountchange

copper mountain
tired surge
#

yeah I won't read hundreds of lines! Please just shre the 5 or 10 lines of code around this

copper mountain
#

Hold on, let me see what is relevant here

#

I fixed, I think pog

true bisonBOT