#rejun_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/1300361420352786434
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Did you include the new amount when you call elements.update ?
Is there a URL that I can visit to test your integration?
yes. shared.
It asks for login, is there a test account that i can use?
It's now asking for verificaiton code
ignore that.
could be your browser setup issue.
I don't think so. I'm testing Google Pay everyday.
Let me know when you fix the problem
We are just calling stripe elements.submit() and await on it. We don't have any specific code from our side. What else could cause this issue ?
Can you share with me your code?
which part ?
Update the payment details and submit payment to Stripe
And can you put some logs to confirm elements.update() is called? I don't see any request to update the elements.
for update we simply used:
elements.update({
amount: amountInSm,
currency: currency.toLowerCase(),
});
we had a log, you can look for PaymentService:: handleDynamicWallet :: xxx AUD
Looks like the first time amount isn't updated, I need to press the Pay button another time to see the correct amount.
ok
And I saw the amount update request after clicking the pay button for the first time
So you might want to put more logs in your code to make sure elements.update is indeed executed before your customer clicks the pay button
ya so pay does an internal server call to get the final payment amount, then does elements.update then does await element.submit() then goes infor PI creation then confirmPayment.
so the pay button triggers a set of actions.
I'll leave this part to you and your developers to sort it out
what is the requirement of elements.update?
it should be updated before elements.submit is called ?
Yes you are right.
So you should call elements.update if there's anything to update, then elements.submit and eventually stripe.confirmPayment
But based on what I observed, element.update wasn't executed successfully, and that's why you should put more logs in your code to troubleshoot.
ok i'll add some more logs.
updated, you can filter by [stripe-elements]
@spare eagle are you still with me?
can you please check the same link again ?
Sure
I'm at this page now and I don't see elements.updates in the log
I'd expect your code to call elements.update once the final amount is decided (i.e., A$ 130)
If you click on pay you can see the updates happening and if you inspect the element, you can see amounts updated internally as well.
as a requirement I need to head to my backend before I can update the elements. so as explained before, on pay > I head to my backend > from there once i get the response, I update my elements > then elements submit > then create PI > then confirmPayment