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

Dropin does not display error message

Open AndreaGhisa1 opened this issue 3 years ago • 0 comments
trafficstars

Describe the bug If we enter a wrong CVV for a stored payment method the error message is not displayed (we set in code dropin.setStatus('error'). From our investigation, it seems the drop-in is reinitialized (onReady method is called again). In the screenshot below you can see how the drop-in looks like after we set the status to error: image image

The class added is "__dropin--ready" instead of "adyen-checkout__status adyen-checkout__status--error".

The flow is as follows when we click "Save" the loading icon appears : image image

After backend validation, we set the error status to drop-in. At that point, the onReady method is called again automatically. In the UI:

  1. The stored payment method remains there with the CVV already filled.
  2. Loading button became "Save" button again.

Based on the documentation we create the drop in as follows:

            const checkout = await AdyenCheckout(configuration);
            dropin = checkout.create('dropin', {
                onReady: () => {
                    console.log('Dropin was initialized');
                    }
                }
            }).mount('#dropin-container');

This problem does not occur in 3.10.1 drop-in version. We just updated the Nuget package to 8.0.1 and drop-in to version 5.3.1 and we saw that the validation is not working properly anymore.

Expected behavior The error message should be displayed in the drop-in when image

Additional context Adyen NuGet version 8.0.1 Web Components/Drop-in v5.3.1

AndreaGhisa1 avatar Jan 25 '22 12:01 AndreaGhisa1