Closed gausam closed 4 years ago
We shouldn't reject it but adjust it to change the pricing accordingly for the level. By default other gateways allow changing from recurring to non-recurring payments. We should adjust the variables sent to PayFast when the discount code is applied. Ensure we don't pass recurring parameters etc.
Superseded by #55.
Closes #53.
Alternatively, we could have the check made in a number of other places such as the pmpro_checkout_before_change_membership_level method.
My decision in going with the filter instead is because it offers the best UX and informs the user early on in the checkout about the invalidity of their discount code.
Are there any other gateways where the scenario we're solving here might actually be an accepted feature? I'm thinking around whether this would affect a multi-gateway set up in some way if this can be considered acceptable behavior to have a fixed-term discount on a recurring subscription.