#Guillaume-PMs

1 messages · Page 1 of 1 (latest)

naive crag
#

Hi there! Wow I actually didn't realize you could pass receipt_email to handleCardPayment.

#

Unfortunately we don't support that on confirmPayment

#

So yes, it would need to be done on PI create

#

Or update

#

Before confirm

next imp
#

Yes, it was very convenient.

#

Ok, I'll just add it when I create the PI then.

#

Another migration related question: in your docs you show a call to confirmPayment with "await". Is this necessary? I'm getting errors if I use an await call.

naive crag
#

Yes this is an async request because the customer may need to handle 3DS at this time.

next imp
#

Am I correct in understanding that I should still be calling this from the form submit event callback?

#

If I try with await, I get the following error: Uncaught SyntaxError: await is only valid in async functions, async generators and modules

naive crag
#

Yep, did you set async for your top level function?

#

Can you provide your code snippet?

next imp
#
ev.preventDefault();
const {error} = await stripe.confirmPayment({```
#

should formSubmit by async then?

naive crag
#

Yep

next imp
#

Ok that works! Sorry, JS is not my main language hehe. Thank you so much! 🙂