Skip to content

fix: minor bugs? in v1 #7

@srizvi

Description

@srizvi

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions