mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
98 stars 50 forks source link

[FEATURE REQUEST] Refund should only be created with state 'refunded' when it was actually processed by Mollie #724

Open Swahjak opened 7 months ago

Swahjak commented 7 months ago

Describe the new feature

A clear and concise description of the new feature.

Describe the solution to be implemented

Given the following recent issues https://github.com/mollie/magento2/issues/720 I was wondering if there could be situation where a refund would only reach the 'refunded' state when it is actually refunded. Magento does support having 3 states on a refund (open, refunded, closed) so from that perspective it should be possible. It seems like the Mollie Payment API also supports this out of the box, but the Orders API seems to be limited (based on the docs, haven't actually looked into it).

Why? Because when something goes wrong, we can visually confirm (but also grammatically) if a refund has been processed in Magento (or even received by Mollie).

Edit: A bit more context:

In Magento, a refund can go through a number of statuses; open, refunded, canceled. The bug from earlier exposed a vulnerability in which refunds (credit memos) were created but not actually refunded (read; not pushed to Mollie at all). By putting a refund in the status 'open' and not moving it to 'refunded' until the actual action is performed at Mollie, we as a company keep a grip on our refunds.

Backend changes A clear and concise description of the new feature in the backend.

Frontend changes A clear and concise description of the new feature in the frontend.

Additional context Add any other context or screenshots about the feature request here.

Frank-Magmodules commented 6 months ago

HI There @Swahjak ,

Thank you for raising this matter. Although we've had a direct conversation, I wanted to provide a clear summary of your question:

During the refund process, adhere to the following steps:

  1. Create an “open” refund.
  2. Send the actual refund to the Mollie platform.
  3. Update the open refund to “refunded” as its final state.

Is my understanding right? We will put this on our planning to see what’s possible here. Once we have an update we will get back to it.

Swahjak commented 6 months ago

Correct, and thereby providing a way to visually (but also programmatically) 'check' if a refund has been processed (without needing Mollie access).