-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent user from multiple clics on pay button #2703
Comments
Hey @jmar212 , Which version of the Drop-in are you using? Did you by any change set the |
I've come across a similar issue, not directly related to using the drop-in's own payment button, but instead using a custom button that calls the // mounting the drop-in.
this.adyenDropin = this.adyenCheckout.create("dropin");
this.adyenDropin.mount("#adyen-dropin-container");
...
// later on in my custom button's handler
this.adyenDropin.submit(); I was mistakenly not disabling my custom button when it was clicked/tapped, meaning you could click it multiple times, in turn invoking Web drop-in version: |
Hey @rsdev88 - if you are using the custom pay button, you are the responsible one for not letting Drop-in submit the payment multiple times as you have control of that by calling the I am closing this thread since the issue is not reproducible on the latest SDK version using the Adyen pay button. |
Hi @ribeiroguilherme, I agree that in this situation I should prevent the custom button from calling |
Hello @ribeiroguilherme, Thanks for your reply! I fixed the issue by calling in the onSubmit callback : component.setStatus('loading'); I thought this behavior was managed automatically while the promise was resolved. I figured out after more research that this solution was working. |
Describe the bug
Hello,
It's possible to spam clic the payment button and this behavior must not be possible. Several cases has caused some unexpected webhook notifications on our side because the user was able to send multiple queries with few millisec of interval.
Our guess is that users either have a bad network connection or accidentally double-click the button.
To Reproduce
I was able to reproduce it with card payment, I didn't tried with other payment methods.
Steps to reproduce :
Expected behavior
When the pay button is clicked, the button is disabled while the http query is sent.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: