#417goose_code
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/1290682496975110205
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ are you trying to update the amount you're using for the Express Checkout Element in the middle of your flow, or are you trying to set the price initially and it isn't displaying as expected?
Gotcha. And how are you initiliazing Elements? Are you creating the Payment Intent first and using its client secret, are you passing mode, currency, amount, etc as part of the initialization?
Yes payment intent first
Do you have a test page where I can see what you're describing?
I am sorry I do not, it's local
req_w6h86rJRWQ3HIR is the request as you can see the intent has the correct value and I would like just loading the express would pull that value correct?
Just doing this to create the express checkout
const expressCheckoutElement = elements.create(
'expressCheckout', exoptions
)
// mount display
expressCheckoutElement.mount('#express-checkout-element')
Yeah, I see the amount set during the Payment Intent creation request as you describe. It's why I was hoping to see the Elements side of your integration to see if I could spot what's going on.
My thought is I am setting the element correct but the element amount is being updated with a decimal value, but wouldn't we see that "update" in the logs?
everywhere I manipulate the amount, I am outputting it and it always is correct, it's just dumbfounded.
Most Elements updates aren't shown in your logs, and you wouldn't be updating Elements if you're using a client-secret form an intent to drive its behavior.
You mentioned link (I'm thinking that's Link) in your original description. Do the Google/Apple pay modals show the correct amount?
No they all show the same incorrect amount
Okay, so Elements is definitely getting the wrong amount then.
When creating expressCheckout element I don't pass any amount correct
it pulls from the payment element
Correct, if you were to manually pass the amount to Elements it would be when initializing Elements itself:
https://docs.stripe.com/js/elements_object/create_without_intent
The Payment Element also pulls its amount from the Elements instance.