First of all sorry for my bad English :).
I’m doing an internship and I have to make an API to calculate commissions in a company.
The most important part of it is that it has to be as adaptative/flexible as possible in terms of adding new variables, periodicity (1Year/1Mouth/Everytime/..), way of calc (full value/%/variable %) and everything new they come up with.
My thoughts are doing a modular program, like making a method to deal with “1 year” or “1 month” and then it works with all the variables or ways of calc, and the same for the variables and ways of calc, etc.
If you have any clue on how to improve I would really appreciate it. Existing API/programs. Tips in general
Btw I’m doing it as a php project but if I need to change I’m up for it!