Open digitalpianism opened 1 year ago
Hello @digitalpianism,
Thank you for raising this issue. We created an internal investigation ticket to reproduce the issue and create solution. We will update you when the investigation is done.
Best Regards, Can
Hi @digitalpianism,
Apologies for taking so long to come back to this issue. We have fixed the store credit issue in #2366 and #2365 to prevent returning the amount twice and have tested this functionality on magento cloud successfully. Thanks for bringing this to our attention. Hope this solution is satisfactory.
Kind regards,
Raoul
Describe the bug For some payment methods like Afterpay, the order is created before the success page. If such payment is refused, the module will cancel the order and restore the quote which will trigger the revert store credit observer twice.
To Reproduce Steps to reproduce the behavior:
Expected behavior Store credit is reverted and not doubled.
Magento version 2.4.4-p3
Plugin version 8.11.1
Additional context Trace that triggers the issue :
Magento\CustomerBalance\Observer\RevertStoreCreditObserver
<= this will trigger the first store credit revertMagento\CustomerBalance\Observer\RevertStoreCreditObserver
<= this will trigger the second store credit revert.