feat: add Polar.sh emulator support#173
Open
codeboost-tr wants to merge 1 commit into
Open
Conversation
Contributor
|
Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
| @@ -0,0 +1,45 @@ | |||
| { | |||
| "name": "@emulators/polar", | |||
| "version": "0.1.0", | |||
Contributor
Comment on lines
+18
to
+23
| const checkout = polar.checkouts.insert({ | ||
| polar_id: polarId("ch"), | ||
| status: "open", | ||
| payment_processor: "stripe", | ||
| client_secret: `secret_${polarId("cs")}`, | ||
| url: `${baseUrl}/checkout/${polarId("ch")}`, |
Contributor
There was a problem hiding this comment.
Suggested change
| const checkout = polar.checkouts.insert({ | |
| polar_id: polarId("ch"), | |
| status: "open", | |
| payment_processor: "stripe", | |
| client_secret: `secret_${polarId("cs")}`, | |
| url: `${baseUrl}/checkout/${polarId("ch")}`, | |
| const checkoutId = polarId("ch"); | |
| const checkout = polar.checkouts.insert({ | |
| polar_id: checkoutId, | |
| status: "open", | |
| payment_processor: "stripe", | |
| client_secret: `secret_${polarId("cs")}`, | |
| url: `${baseUrl}/checkout/${checkoutId}`, |
Checkout url is built with a fresh random id from a second polarId("ch") call, so it never matches the checkout's actual polar_id.
Author
|
@ctate — quick nudge: the Vercel deployment check is blocked because the Vercel Labs team hasn't authorized the GitHub app. Could a team member click through https://vercel.com/git/authorize?team=Vercel%20Labs&slug=vercel-labs so the deploy preview can run? The PR itself is small (13 files, polar.sh emulator support) and ready for review once CI can run. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new emulator for Polar.sh, including support for organizations, products, prices, checkouts, and subscriptions. Fixes #46.