You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Website: Add support for promotional codes on the self-service license dispenser (#26280)
Changes:
- Added the ability to use coupons on the Fleet premium license
dispenser
- Updated the stripe webhook to support coupons on Fleet premium
subscriptions
- Updated the customer dashboard on the website to show decimal places
in subscription/host prices.
// (Optionally) adjust the price of this subscription if a coupon was applied.
194
+
if(stripeEventData.discount){
195
+
if(stripeEventData.discount.coupon){
196
+
if(stripeEventData.discount.coupon.amount_off){
197
+
// If the coupon applied takes a fixed dollar amount off of the total price, subtact the amoutn fro mthe subscriptionPrice
198
+
subscriptionPrice=_.round(subscriptionPrice-(stripeEventData.discount.coupon.amount_off/100),2);// Note: coupon.amount_off contains the discounted amount in cents.
0 commit comments