This post was originally published in Portuguese on my blog: Status de pedido com if espalhado gera estorno duplo -> State . Every order system has an Order class with a Status property. At first there are three or four statuses, each action checks the current status with an if , and everything...
Source: [Dev.to](https://dev.to/dunirvana/duplicate-refunds-from-scattered-status-checks-fixing-it-with-the-state-pattern-in-c-382m)