Hello everyone!
Today is the second time I am going to talk about Sylius plugins developed by the Sylius Core Team. Since we have covered the topic of reordering a previously placed order by a customer, let’s assume that the delivered product was damaged or its variant is not the one you have ordered.
Here comes the Refund Plugin!
Before the Refund Plugin was released, Sylius had allowed refunding an order once the customer contacted the administrator personally and had discussed every detail via e-mail or phone. What’s more, refunding whole order’s total was the only possible option. Briefly speaking, it was up to two individuals to begin, endure and complete the whole process with a negligible impact of Sylius itself.
What was wrong with that approach? Firstly, it did not offer a wide range of possibilities and business value. Secondly, Sylius purpose is Catalyze trade with technology – the previous version of refund functionality was hardly assembling any eCommerce domain elements. Hence, the necessity of extending such an essential feature as refunds was placed high in our backlog.
At first, it is another Sylius extension developed by the Sylius Core Team. Let’s see what it has to offer:
The core functionality is based on both commands and events. The business logic process, from receiving a request by a controller to displaying a successful notification, is following:
Apart from the refund feature, the plugin involves a lot of both custom and Resource-related logic. As usual, since the Refund, Credit Memo and Refund Payment entities are Sylius resources, the basic CRUD actions and grid are defined in the config.yml file. On the other hand, features such as downloading a credit memo or marking a refund payment as completed have their own related single action controllers.
Like any other Sylius plugin developed by the Sylius Core Team, the Refund Plugin is an open-source project available via Github, which means that cloning or forking the repository can be done anywhere, anytime, by everyone. We are elated to deliver another customizable feature to our community. Feel free to keep us up to date with your user/developer experience – our sole focus is to create software which is as developer friendly as possible and thus we are looking forward to receiving your feedback.
Happy refunding!