Adyen / adyen-flutter

MIT License
23 stars 4 forks source link

Offline handling for AdyenComponent #256

Open drekyyy opened 2 weeks ago

drekyyy commented 2 weeks ago

Describe the bug A clear and concise description of what the bug is.

I am testing offline cases for adyen card component and stumbled upon few issues (probably reproducible for gpay and applepay): Issue 1: Have no internet connection -> navigate to AdyenCardComponent -> get this PaymentResult: Instance of 'PaymentError', reason: com.adyen.checkout.core.exception.ComponentException: Unable to fetch publicKey.

Issue 2: Be online -> navigate to AdyenCardComponent -> drop internet connection -> submit correct card details -> get this PaymentResult: Instance of 'PaymentError', reason: Null check operator used on a null value

Expected behavior

If possible Id want the PaymentResult to be of certain type clearly indicating what went wrong

Robert-SD commented 1 week ago

Hello @drekyyy, thanks for pointing out the two issues. Having a result that clearly indicates what went wrong is indeed the right expected behavior. I will look into it and create a task for adding the checks.

As a spontaneous idea for the advanced flow integration: By adding a connectivity check and providing an Error PaymentEvent within the onSubmit and onAdditionalDetails callback could be a solution. But I will check this as well and would like to keep this ticket open for further collaboration.