#ludvig-paymentelement

1 messages · Page 1 of 1 (latest)

oak linden
#

you can't today, but having a function to reload the Element is on the roadmap, as you say, it's needed if you want to change the amount of the PaymentIntent

#

basically you have to entirely destroy the component and create it anew

lone gyro
#

Okay, yeah. I hope we get it soon 🙂 Could you give an example of how your proposed solution could be done?

oak linden
#

I don't have one no

lone gyro
#

Alright. Thank you for your answer.

About the reload/update amount function on the roadmap - Do you have any clue on how far away or how prioritized it is?

#

Btw - Can you send a message to the devs that they need to update an error message?

elements.getElement("").destroy()

IntegrationError: A valid Element name must be provided. Valid Elements are: card, cardNumber, cardExpiry, cardCvc, postalCode, paymentRequestButton, iban, idealBank, p24Bank, auBankAccount, fpxBank, afterpayClearpayMessage; you passed: .

#

There is no such thing as payment element?

#

This works though: elements.getElement("payment").destroy()

Which is why they need to add "payment" to that error message of valid element names

oak linden
#

I agree

#

I'll pass it on