-
Notifications
You must be signed in to change notification settings - Fork 222
[ECP-9711] 😍 Mutation adyenPaymentDetails - Support exception message #2967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[ECP-9711] 😍 Mutation adyenPaymentDetails - Support exception message #2967
Conversation
|
Hello @dimitriBouteille, Thank you for your contribution. Your agility to provide a solution is commendable! Let us review this PR and get back to you as soon as possible. Best Regards, |
|
Hey @dimitriBouteille, Hope you are doing great! Thank you for your contribution, the effort here is really appreciated, and we agree with the problem you’re solving - today the That said, introducing new exception messages at this point would be a Breaking Change for integrators who may already rely on the current generic error format. To avoid unexpected regressions, we’ll only be able to cater this request in a slightly modified form as part of the next major release of the plugin. Our planned approach is: Instead of throwing different exception messages for refusal/cancellation or any other scenarios, we will handle the Shopper-facing messages will remain consistent, while the detailed This way we improve observability and developer experience following magento's best practices. Again, thank you for raising this and putting effort into a PR, it’s very valuable input and will influence the new major version design. Regards |
|
Hi @khushboo-singhvi Thanks for your feedback. The fix made in #3092 is available in v10 or v11 (so the next major version) ? I don't understand the PR, if the payment failed, which response is returned by the graphQL request Dimitri |
|
Hey @dimitriBouteille, Thanks for your follow-up. To clarify:
For the Appreciate your understanding here. We’ll keep you updated once this is implemented and available. Regards, |
|
Hi @khushboo-singhvi Thanks for the details, everything is good👌 |
Description
As discussed in ticket #2056, the idea is to offer the developer to return custom exceptions in the graphQl
adyenPaymentDetailsquery. The objective is to be able to manage more easily the different cases (Refused, Canceled,...) in headless projects.Today the mutation returns a generic error, which can pose problems for headless projects, it is impossible to manage the different cases (Refused, Canceled,...)
This PR allows to manage more finely the different cases by adding a few lines of code via a plugin or a preference on the
handleExceptionfunction.Here is an example of a plugin that could be set up by a developer:
Tested scenarios
Fixes #2056