Adyen / adyen-magento2-hyva

MIT License
7 stars 4 forks source link

Error handling in General & Chances of Quote getting deactivated #16

Closed pmarjan-onestic closed 7 months ago

pmarjan-onestic commented 8 months ago

A.

I have been trying to safe-prove any code stack by trying to catch any possible exceptions in an attempt to ensure that the frontend customer is both not interrupted in the case of backend exceptions, and hopefully properly informed of what may have gone wrong.

@RokPopov @candemiralp on the chance that I might be missing something, could you please review the code base from error handling perspective?

Latest relevant branch: develop Targeted commit: https://github.com/Adyen/adyen-magento2-hyva/commit/670d1eee3985fa5e9ddffa2b3fe67f88c7c189d2

B.

@RokPopov @candemiralp I believe latest (9.2.0) version of Adyen_Payment plugin, keeps the quote active, when this is necessary, relatively accurately.

I wonder though: are there any circumstances (like in some "weird" cases) under which we still have not completed the payment, but the quote is deactivated?

I would appreciate some sort of brainstorm on this question, since there are many stacks available that sooner or later will call

Magento\Quote\Model\QuoteRepository->getActive()

which will throw an exception, and then this leads to a new concern: how should we act with inactive quote?

To put things in touchable context, for example:

a. select credit cards method b. filll with 3ds card c. place the order, wait for the challenge popup to appear d. go in the database, locate the quote and set is_active = 0 (is this possible at all in a real use case??) e. go back in the browser, type the correct password f. we will see that the order completes successfully

pmarjan-onestic commented 7 months ago

We cannot do anything about improbable/edge cases. This ticket will be closed.