adyen-web icon indicating copy to clipboard operation
adyen-web copied to clipboard

setStatus to ready doesn't work if is set multiple times

Open AndreaGhisa1 opened this issue 3 years ago • 3 comments

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
 });
  1. For a stored payment method enter a wrong CVV.
  2. Dropin should be set to error state. Click on the "x" icon. image
  3. The drop-in is initialized to ready state with all the payment methods displayed. image
  4. For the selected method enter a wrong CVV again.
  5. 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. image

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

AndreaGhisa1 avatar Jan 26 '22 12:01 AndreaGhisa1

Hi @AndreaGhisa1 ,

Can you try the version 5.6.2 ? We added a bug-fix there which might fix your issue.

ribeiroguilherme avatar Jan 26 '22 14:01 ribeiroguilherme

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

AndreaGhisa1 avatar Jan 26 '22 14:01 AndreaGhisa1

The embedded scripts should be available by next Monday

ribeiroguilherme avatar Jan 27 '22 12:01 ribeiroguilherme

Issue was fixed on 5.11.0, therefore I am closing this issue.

ribeiroguilherme avatar Oct 04 '22 11:10 ribeiroguilherme