In my second time working at Learncafe, this time as CTO, we got a challenge of rewrite the checkout system. We also should implement the coupon system on it and change the payment gateway. We were planing rewrite the application entirely from the scratch, but first we should complete this task to keep the things working well until the next app version get done.
I did a completely analysis of the current code and process. My idea was make the cleaner and centralized code as possible. This would minimize our problems to maintain the code and bugs tracking. So I wrote a brand new transaction class, which I gave the responsibility to take care of all the checkout tasks. I eliminated old classes and methods and brought the important ones to the new transaction class. Then I implemented the new payment gateway that gave a prettier interface and a more secure transaction process. Finally, I implemented the coupon and vouchers system, with their validations and restrictions. The class just needed to be instantiated and be filled with the transaction parameters. When the init method was called, it would process all the payment tasks, throwing exceptions when something wrong happened with the validations and returning the processed data when everything got right to be returned to the user.
Of course, the old interface didn’t fit to this new checkout system. So I needed to design and develop a improved version of it. And I did it. The final result got very pretty, with clear information and providing us a much more secure process.
A Brazilian Full Stack Developer who loves technology, nature, animals, soccer, games, travel and to learn new languages…