PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 56 forks source link

Debit requests that refund all items don't contain the discounts #366

Closed theCapypara closed 3 years ago

theCapypara commented 3 years ago

When refunding an invoice that contains discounts, the API request only contains the refund items, if NOT all products are refunded. This leads to the API error "1610 - An error occurred while processing this transaction (wrong parameters)."

Related line in code: https://github.com/PAYONE-GmbH/magento-2/blob/master/Model/Api/Request/Debit.php#L126

I talked with one of your technical support team about this, we couldn't really understand why the discounts are excluded in those cases, but it's incorrect as far as I can tell.

hreinberger commented 3 years ago

Hi @Parakoopa I just tried this out in one of our test shops:

  1. put 3 items in cart
  2. apply coupon code
  3. use PAYONE safe invoice (which is famously picky about cart data)
  4. capture all items
  5. refund only 2 items

This has worked as intended for me without errors. This behavior could come down to an individual configuration in your account. Could you once again contact our tech support with the following info:

You can refer to this issue in your mail. Sorry to put you through our support process again. It's much easier for us to help you when there's a reference in our support system rather than an issue without any ID though.

theCapypara commented 3 years ago

Just to make sure: The issue occurs when refunding all items, have you tried that?

hreinberger commented 3 years ago

oops sorry didn't read properly. 😅 I actually tried partial and full refunds in my tests though, so I still can't reproduce the error. For future (internal) reference:

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hreinberger commented 3 years ago

closing this due to inactivity. If this is still ongoing, feel free to open a new issue.