Skip to content
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

fix: minor bugs? in v1 #7

Open
srizvi opened this issue Nov 9, 2024 · 0 comments
Open

fix: minor bugs? in v1 #7

srizvi opened this issue Nov 9, 2024 · 0 comments

Comments

@srizvi
Copy link

srizvi commented Nov 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant