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

Web component: callback for loading error

Open JesusNaturitas opened this issue 3 years ago • 3 comments

Hi.

I'm looking for a way to show an error message when card form fails to load on your side.

A onConfigFailure callback (opposite to existing onConfigSuccess callback) would do the trick. Is there any similar callback?

Thanks a lot!

JesusNaturitas avatar Nov 17 '21 16:11 JesusNaturitas

Hi @JesusNaturitas ,

Do you mean the whole card form, or just the secured fields? Can you please clarify the scenario that you are trying to achieve?

It can help If you share a code snippet/screenshots of what is happening or what you expect to happen.

ribeiroguilherme avatar Nov 19 '21 15:11 ribeiroguilherme

👋 I am also looking for something similar. I am using a custom card integration and I have seen a few times that it appears adyen.js loads successfully in the network tab but then an error occurs when configuring adyen. I had a har file sent to me from the customer and this is why I saw that the adyen script loaded correctly but the secured fields never configured and the customer wasn't able to use the form.

I am using the onConfigSuccess callback to see when the payment form is correctly configured but it would be great if there was also a onConfigFailure callback so that when these issues occur I could get a better idea of the error to help out my customers.

I have found a few cases where a customer was using an ad blocker which blocked the securedFields iframe from loading. This is one case where it would be good to report the iframe not loading to our sentry and additionally handle this error in the app.

Jazilch avatar Jan 20 '22 10:01 Jazilch

@ribeiroguilherme Did you have any thoughts on my example above? Not sure if this gives you enough information about a use case for this callback

Jazilch avatar Feb 11 '22 15:02 Jazilch

I believe that this issue has been addressed with PR #1714

sponglord avatar Sep 20 '22 09:09 sponglord