Skip to content

Commit

Permalink
fix logic for link building
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalian committed Sep 18, 2024
1 parent 102c241 commit b4d0f3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions valhalla/jawn/src/managers/stripe/StripeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const proProductPrices = {
alerts: process.env.PRICE_PROD_ALERTS_ID!,
};

const EARLY_ADOPTER_COUPON = "9ca5IeEs";
const EARLY_ADOPTER_COUPON = "WlDg28Kf"; // WlDg28Kf | prod: 9ca5IeEs

export class StripeManager extends BaseManager {
private stripe: Stripe;
Expand Down Expand Up @@ -270,11 +270,12 @@ WHERE (${builtFilter.filter})`,
tier: "pro-20240913",
},
},
allow_promotion_codes: true,
};

if (this.shouldApplyCoupon()) {
sessionParams.discounts = [{ coupon: EARLY_ADOPTER_COUPON }];
} else {
sessionParams.allow_promotion_codes = true;
}

const session = await this.stripe.checkout.sessions.create(sessionParams);
Expand Down

0 comments on commit b4d0f3e

Please sign in to comment.