Played around with the coupon function, it is working perfectly.
I have a concern though, on promo code validation, or lack of.
To repro:
Entered a valid test CC
Entered a random promo code that doesn’t exist in my coupon configuration
Transaction was completed
The full price was charged without any discounts
System-wise, this is expected behaviour, don’t get me wrong. But I am hoping to get consensus that step 2 requires some form of user intervention, The process should be halted and the user prompted if an invalid promo code is entered.
By allowing the transaction to go through, the user expects a discounted price but will be surprised at the full charge. The occurrence of typos is real, I have seen users fumbling with even the simplest copy-paste instructions.
Some considerations if this can be repro by all:
Introduce validation checking of promo codes
Ability to prefill the promo code field through hardcoded URL parameters to minimize manual typing e.g. /s/productname?promo_code=awesomesupporter