-
Notifications
You must be signed in to change notification settings - Fork 0
Lazy-init OpenAI in GPT-5 route + allow GitHub avatars #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| \b\d{3}-\d{2}-\d{4}\b | ||
| \b\d{10}\b | ||
| MRN:\s*\d+ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -389,7 +389,7 @@ export const createStudentCheckoutSession = action({ | |
|
|
||
| // Special discount code to force one-cent price (for testing/promotions) | ||
| const pennyEnv = process.env.STRIPE_PRICE_ID_ONECENT || process.env.STRIPE_PRICE_ID_PENNY; | ||
| const pennyCodes = ["ONECENT","PENNY","PENNY1","ONE_CENT"]; // MENTO12345 removed; now handled as 99.9% discount | ||
| const pennyCodes = ["ONECENT","PENNY","PENNY1","ONE_CENT","MENTO12345"]; | ||
| let isPennyCode = false; | ||
| if (args.discountCode && pennyCodes.includes(args.discountCode.toUpperCase())) { | ||
| isPennyCode = true; | ||
|
|
@@ -516,6 +516,13 @@ export const createStudentCheckoutSession = action({ | |
| const stripeCouponId = args.discountCode.toUpperCase(); | ||
| const promotionCodeId = (couponDoc as any)?.promotionCodeId as string | undefined; | ||
|
|
||
| if (!isPennyCode) { | ||
| const metadataType = (couponDoc as any)?.metadata?.type || (couponDoc as any)?.metadata?.Type; | ||
| if (typeof metadataType === "string" && metadataType.toLowerCase() === "penny") { | ||
| isPennyCode = true; | ||
| } | ||
|
Comment on lines
+519
to
+523
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P1] Override price when coupon metadata marks code as penny The new metadata check sets Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| // Applying Stripe discount (skip for penny-code which uses price override) | ||
| if (!isPennyCode) { | ||
| if (promotionCodeId) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Code Re-addition Overrides Documented Discount Behavior
Re-adding
MENTO12345topennyCodescontradicts the previous explicit decision to handle it as a 99.9% discount. This change causesMENTO12345to apply a fixed $0.01 price instead of its intended percentage discount, overriding documented behavior and potentially leading to incorrect pricing.