Sylius / RefundPlugin

Basic refunds functionality for Sylius
MIT License
63 stars 68 forks source link

Make refunds stoppable #99

Open peterukena opened 5 years ago

peterukena commented 5 years ago

When using the RefundPaymentGenerated event to execute any refund-process based code it is not possible to roll back a refund.

Imagine talking to some form of API after a refund was initiated which decided that refund is not good. There is no way to undo that refund payment, which means it remains in the system even though other factors have decided it should not exist in the first place.

CC @Zales0123

bartoszpietrzak1994 commented 5 years ago

We've thought about replacing Process Managers for both CreditMemo and RefundPayment with a saga for whole refund process and therefore implement rollback mechanism for reverting a refund.

I can imagine triggering those mechanisms manually from admin panel once the refund turns out to be not satisfactory.

See this issue: https://github.com/Sylius/RefundPlugin/issues/91

peterukena commented 5 years ago

You have to think about online payments. Either Payum as a barrier or any manually implented gateway like we have. When the refund is created, some sort of trigger needs to occur on which you can execute custom logic which can decide to not accept/complete that refund payment.