Users should be able to upgrade & downgrade their membership level whenever they want.
- The minimum amount of time you can buy is still one month. This means that if you haven't paid enough yet to allow for a month of the new membership level, you have to pay extra.
- Switching between membership levels should be lossless w.r.t. costs.
- Assume that a membership level represents a fixed amount of money per time (MPT).
- Use the MPT of the current membership level to convert the time between now and the subscription's next payment date into money.
- Use the MPT of the desired membership level to convert that money back to a new time period.
- If that time is less than a month, the user has to pay the difference.
- If that time is a month or more, the next payment date is extended accordingly.
Changing the membership level implies:
- Change existing membership.level to point to the new level
- Change subscription.plan to point to the payment plan that belongs to that membership level.
- Change subscription.price so that it matches the payment plan.
- Send a confirmation email to the user.