adyen-magento2 icon indicating copy to clipboard operation
adyen-magento2 copied to clipboard

FAM-1166: change order by field

Open Rafal-Dzierzbinski opened this issue 2 years ago • 1 comments

Our main issue is that, functionality "Refund from last payment first" is not working correctly.

config

We noticed that we have different refunds sequence, on identical orders with partial payments.

adyen_notification

As you can see, on the ps above, in order with merchant_reference 4110003215 refunds are arranged correctly, but in orders (4110002771, 4110002744) they are wrong.

adyen/module-payment/Model/ResourceModel/Order/Payment/Collection.php

This is a result of sorting data from adyen_order_payment table by create_at, because sometimes both refunds are processed at same second. This create issue, when system is fast enought to process both refunds at same second, payments are returned in wrong order (the configuration in admin is not taken into consideration is this case). Example is bellow.

adyen_order_payment

In the second query, you can clearly see, that result is not ordered correctly.

Rafal-Dzierzbinski avatar Dec 10 '21 11:12 Rafal-Dzierzbinski

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] avatar Jan 10 '22 13:01 sonarcloud[bot]

This PR will be closed due to inactivity. Feel free to re-open it if the suggested changes are made.

Thanks, Jean Adyen

Morerice avatar Aug 25 '22 13:08 Morerice