#rejun_code

1 messages ¡ Page 1 of 1 (latest)

leaden rainBOT
#

👋 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.

spare eagle
#

Did you include the new amount when you call elements.update ?

devout gull
#

yes.

#

amount and curreny as well.

spare eagle
#

Is there a URL that I can visit to test your integration?

devout gull
#

yes. shared.

spare eagle
#

It asks for login, is there a test account that i can use?

devout gull
#

sharing.

#

please check.

spare eagle
#

It's now asking for verificaiton code

devout gull
#

ignore that.

spare eagle
devout gull
#

could be your browser setup issue.

spare eagle
#

I don't think so. I'm testing Google Pay everyday.

#

Let me know when you fix the problem

devout gull
#

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 ?

spare eagle
#

Can you share with me your code?

devout gull
#

which part ?

spare eagle
#

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.

devout gull
#

for update we simply used:

elements.update({
    amount: amountInSm,
    currency: currency.toLowerCase(),
});
spare eagle
devout gull
#

we had a log, you can look for PaymentService:: handleDynamicWallet :: xxx AUD

spare eagle
#

Looks like the first time amount isn't updated, I need to press the Pay button another time to see the correct amount.

devout gull
#

ok

spare eagle
#

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

devout gull
#

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.

spare eagle
#

I'll leave this part to you and your developers to sort it out

devout gull
#

what is the requirement of elements.update?

#

it should be updated before elements.submit is called ?

spare eagle
#

Yes you are right.

So you should call elements.update if there's anything to update, then elements.submit and eventually stripe.confirmPayment

devout gull
#

that's what's happening on our side.

#

update is for sure fired before submit

spare eagle
#

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.

devout gull
#

ok i'll add some more logs.

devout gull
#

updated, you can filter by [stripe-elements]

#

@spare eagle are you still with me?

#

can you please check the same link again ?

spare eagle
#

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)

leaden rainBOT
devout gull
#

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

small elbow
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

Could you please share the reproduction URL again?

devout gull
#

I'm not able to share it with you in DM.

#

can you please take the details from @spare eagle or allow DM for me.

#

@small elbow are you with me ?