-
-
Notifications
You must be signed in to change notification settings - Fork 61
Add-on minute checkout session setup #2944
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
base: main
Are you sure you want to change the base?
Conversation
4ee2020 to
82a6295
Compare
5ad2648 to
93fd027
Compare
e583fe7 to
9fa5509
Compare
9fa5509 to
febe01f
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
Working well on dev, with a really smooth user experience. I left a few comments. I am leaning with Emma toward handling the org quota update in a transaction as the right approach here, as long as the effort isn't prohibitive (in which case #2999 seems like a good option to tide us over for now, but maybe with some more comments to help devs reading the code walk through the business logic of the aggregation). It might also be good to use this opportunity to improve our test coverage for the update quota method a little bit regardless of which path we take to test edge cases like attempting to set a quota below 0 in an update. |
- add get_checkout_url method to create checkout session for additional minutes - add /checkout/execution-minutes endpoint to handle addon purchase requests (this will need to be updated in dev/prod playbooks) - update CI workflows to remove portalUrl suffix from secret value - add test endpoint in echo server to mock checkout response
…o buy more minutes
- handle minutes purchased via SubscriptionAddMin event - use /subscriptions/add-minutes endpoint to add additional minutes
- remove context - total_price -> totalPrice - context -> paymentId - store subEventId in quota update, linking to subscription event id - org fields: don't include subEventId in org quota updates output, add OrgQuotaUpdateOut for this
261f9b8 to
43bb583
Compare
Supports purchase of additional minutes by the org admin, fixes #3051
Waiting on these PRs to be merged into this:
Refactor quota updates to use aggregation pipeline #2999