#harty_api
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/1316698418562732064
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! Yes I'm here. It's based on the Stripe docs but slightly modified - let me dig it out....
I apologise in advance but the code is legacy and not the cleanest really....
no worries
It's actially too long to send on here I think
ok well what's the part of it that creates the button? what integration is it, is it PaymentRequestButton, or something else?
Yeah we are using the PaymentRequestButton
well usually " the UI/modals seem to hang" means your code is not calling ev.complete() in the token/paymentmethod handler, which is what closes the wallet modal. Without calling that they generally stay in a 'spinning' animation for a while until the browser kills them
https://docs.stripe.com/stripe-js/elements/payment-request-button#:~:text=)%20%7B%0A%20%20%20%20//-,Report%20to%20the%20browser%20that,-the%20payment%20failed
so that's what I would look at
Thanks, we have ev.complete('fail') calls and an ev.complete('success') call so that sort of points in the direction something has been moved outside a code block I think, will see what I can find now
it could be something like your call those after executing some other code or a call to your backend, and that code/call is failing with uncaught exceptions, maybe. Hard for me to say but in general this symptom is somewhat common and it's to do with your code never calling those functions