Hi there, I'm working on developing a simple discount code plugin for Moodle. My plan is to create multiple paypal enrollment instances. By default, a user will see just one with all other instances hidden, but by entering a discount code, a specific paypal enrollment instance will show.
Example: Course A, normal cost $20
Default: Enrollment screen offers Paypal enrollment, $20, plus a text input for a discount code.
Action: User inputs a discount code.
Result: Paypal instance A is hidden and Instance B (or C, D) is shown, with new, lower price. (Checks out like normal)
For other developers out there, does this seem like a plausible course of action for this functionality. Anything I should be aware of?