adyen-web
adyen-web copied to clipboard
setStatus to ready doesn't work if is set multiple times
Describe the bug When setStatus('ready') is called multiple times to set back to the initial state, the drop-in remains stuck in the current state (no matter what state is at that moment or what state we are trying to set).
To Reproduce We attached a 'click' property on the error icon from the dropin. When user clicks on error message the drop-in should be initialized with stored payment data to allow the user to enter the data again.
adyenErrorSelector = ".adyen-checkout__status.adyen-checkout__status--error";
$(document).off('click', adyenErrorSelector);
$(document).on('click', adyenErrorSelector, function () {
dropin.setStatus('ready');
that.getPaymentMethods(); //gets the store payment methods for the user
});
- For a stored payment method enter a wrong CVV.
- Dropin should be set to error state. Click on the "x" icon.
- The drop-in is initialized to ready state with all the payment methods displayed.
- For the selected method enter a wrong CVV again.
- Observe what happens with the drop-in:
- The loading state disappears and the error state is not displayed.
- It remains in ready state with the CVV populated.
Expected behavior Drop-in should be initialized with correct state even if setStatus('ready') is called multiple times.
Version used Additional context Adyen NuGet version 8.0.1 Web Components/Drop-in v5.3.1
Hi @AndreaGhisa1 ,
Can you try the version 5.6.2 ? We added a bug-fix there which might fix your issue.
Hi @ribeiroguilherme, Unfortunately, I cannot test that version until the links to the CSS and java script file are posted. I'm using that in my integration. I've tried to use version 5.6.1 but I cannot use it because of this reported error: https://github.com/Adyen/adyen-web/issues/1426
The embedded scripts should be available by next Monday
Issue was fixed on 5.11.0, therefore I am closing this issue.