Add attribute discount-applied=1 to discountcode textfield when discount is applied and valid
Currently there is no way to detect (on the form via javascript) that a discount code is valid and has been applied.
The adds an attribute to the discount text field - "discount-applied=1" which can then be used by (eg. Stripe - stripe!157 (merged)) to detect whether the code needs to be applied before submitting.