mollie / magento2

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

Partial Refunds not possible #626

Closed azngeek closed 1 year ago

azngeek commented 1 year ago

Describe the bug

When doing a partial refund when a refund with the same item has been processed before, Mollie will throw a " A duplicate refund has been detected." error.

Used versions

To Reproduce

  1. Create an order with one item with multiple quantities
  2. Do the refund using the API and this payload
  3. Only substract one quantity
  4. The refund will work
  5. Do it again with the same payload.
  6. You will now get an duplicated refund error.
{
    "items": [
        {
            "order_item_id": <order_item_id>,
            "qty": 1
        }
    ],
    "notify": true,
    "isOnline": true,
    "arguments": {
        "shipping_amount": 0,
        "adjustment_positive": 0,
        "adjustment_negative": 0
    }
}

Expected behavior

It is expected that you can do as many refunds as possible until there are no more items left. An item which has been refunded partially should not trigger an "A duplicate refund has been detected." error

Actual behavior

Fo a given item, for example if i do have ITEM B with a sold quantity of two, if i do multiple refunds with each having a quantity of one, the last refund will fail.

Screenshots

This is an example of one item where only one was refunded.

image

This is the error i get when i try to refund the same item again. That should be possible as only one was refunded yet.

image

This is the error in the server log:

image

fjbender commented 1 year ago

Hi @azngeek,

Thank you for your report! This is actually platform behavior but can be controlled by our support team.

Please reach out to them (or me) to get this setting right for your affected merchant(s).