forked from midday-ai/v1
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Hey y'all! 👋 (wuddup Shawn!)
Thank you all for your contributions and leadership! After facing some challenges with the CLI initially, tried again today. 🧈 🙌🏽
🐛 Checkout & Currency Issues? Addressed
Resolved two issues while testing locally:
1. Polar Checkout Error
Removed unsupported subscriptionId
parameter from checkout creation. The polar API changed:
const checkout = await createCheckout({
customerEmail: user.email,
productPriceId: price.polarId,
successUrl: `${env.SITE_URL}/settings/billing`,
- subscriptionId: user.subscription?.polarId, // Deleted this line
});
2. Currency Locale Error
Simplified getLocaleCurrency()
to return USD only (Polar's current support):
export function getLocaleCurrency() {
return CURRENCIES.USD;
// Future implementation for multi-currency support:
/*
if (typeof window !== 'undefined') {
return navigator.languages.includes("it-IT")
? CURRENCIES.EUR // My friends from 🇮🇹 can pay in Euro
: CURRENCIES.USD;
}
return CURRENCIES.USD;
*/
}
Thanks again for the awesome work on this. Please ignore me if I'm way off base.
Metadata
Metadata
Assignees
Labels
No labels