#Big J - PaymentElement

1 messages · Page 1 of 1 (latest)

stone raft
#

Hello. One moment while I catch up on threads here

outer belfry
#

No problem, thanks for the help in advance!

stone raft
#

Just curious, why do you update the amount after the paymentelement is loaded?

outer belfry
#

because in our UI, you can change the quantity of the item on the same page as the card payment inputs

#

so changing quantity triggers an api call, which then on the backend updates the payment intent (i pass the ID) and it all functions correctly, its just that then after doing that clicking apple pay or google pay, displays the wrong amount

#

atm i have gotten around it by reinitialising the payment element, but as you can imagine if i could avoid doing that it'd be amazing

stone raft
#

Ah got it that makes sense

#

Looking

#

One thing you could do is ask for the quantity in your flow prior to loading the PaymentElement. Looking to see if there's a suitable alternative though

outer belfry
#

yeah, i figured thats how the elements intend to be used, but i see that there is an update method for payment request directly, i just wish i could access that via the payment element

stone raft
outer belfry
#

okay brilliant! i may jump on that issue to see if there is any update, it'd be really useful

#

thank you for checking for me