adyen-web
adyen-web copied to clipboard
Dropin does not display error message
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:

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 :

After backend validation, we set the error status to drop-in. At that point, the onReady method is called again automatically. In the UI:
- The stored payment method remains there with the CVV already filled.
- 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

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