#archmaze.

1 messages · Page 1 of 1 (latest)

thorn tangleBOT
sleek vigil
#

How are you integrating with Stripe - Payment Element? Express Checkout Element?

lime wedge
#

Payment Element

sleek vigil
#

Do you have a test site that we can access to take a look?

lime wedge
#

yes sure

#

i'm getting v3/:1 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Delegation is not allowed without transient user activation. in console

sleek vigil
#

we can't access your test site. Anyway the code that shows the payment sheet, like confirmPayment() or `elements.submit(), must be invoked directly by a user activation event, like a click or a touch gesture. To prevent this error, you need make sure the code that shows the payment sheet is at or near the top of your user gesture event handler, before any async or long-running code.

lime wedge
#

in my case if user click on pay button it creates subscription and confirm the payment and retrieve payment status

#

can you use VPN ? you need to access it from Australia

sleek vigil
#

no, we can't use VPN

#

can you share your code snippets where you've implemented the payment element and confirmPayment or elements.submit?

lime wedge
#

sure

#

this is how my payment page looks

sleek vigil
#

what do you do in disableButton?

#

can you try commenting out disableButton()?

lime wedge
#

let me try

#

still same

#

i think it's because of

#

my code is confirming payment after creating subscription

sleek vigil
#

you're using the deferred intent flow right?

#

if you try commenting out that line, does that make a difference?

lime wedge
#

commenting out disable button didn't work

sleek vigil
#

i mean comment out the handlePaymentType()

lime wedge
#

ok

#

that lets the google pay popup display and the user can click on pay and it disappear... the error message is displaying on confirm payment

sleek vigil
#

which error? do you mean you're still getting the same Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Delegation is not allowed without transient user activation. in console?

lime wedge
#

nope

#

that is solved after commenting out handlePayment

sleek vigil
#

alright, what do you mean by the error message is displaying on confirm payment ?

lime wedge
#

Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Delegation is not allowed without transient user activation.

this error comes if we uncomment handlePayment... handle payment lets to another function to create subscription and subscription leads to confirmPayment

#

so i can't comment out handlePayment

#

got it...

#

thanks... there was another submit on confirm payment.

sleek vigil
#

ahhh great then!