I am currently developing a plugin for shopware for a gift card provider.
Almost everything works like intended except the last part:
I want to send an email to the store owner whenever a refund is issued that was paid / partly paid with the gift card to notify them of manually refunding a certain amount back onto the gift card.
I do have a listener currently on the event where the status of an order switches to ‚refunded‘ but in this case I don’t have all the information to see what the refunded amount was.
I also checked some payment provider plugins and they all seem to implement their own custom way of refunding orders, making it even harder to get this information in a generic place (instead of writing code to get the info for all these different payment providers).
Does anyone have a place where I could listen to refunds that all these payment providers are bound to use and where I can get all the information about the refund? (amount, order lines and such).
Any help is greatly appreciated!