-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(console): App storage billing integration #2837
feat(console): App storage billing integration #2837
Conversation
191a751
to
06056e9
Compare
a052837
to
f98bb5c
Compare
18d28f6
to
51219ee
Compare
eeeccaa
to
0191aed
Compare
@@ -24,6 +25,7 @@ const AppDataStorageModal: React.FC<AppDataStorageModalProps> = ({ | |||
subscriptionFetcher, | |||
currentPackage, | |||
topUp = false, | |||
currentCost = 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to name this cost as opposed to price? Preferably all wording around this should be uniform, ie. price.
@@ -262,14 +263,19 @@ export const action: ActionFunction = getRollupReqFunctionErrorWrapper( | |||
|
|||
URN = metaDel.URN as IdentityRefURN | |||
|
|||
const delSub = event.data.object as Stripe.Subscription | |||
delSub.items.data.forEach(async (item) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be converted to an array of promises which can be Promise.all()
d, otherwise some of these async calls may run concurrently with the promises below or not finish at all.
apps/console/bindings.d.ts
Outdated
@@ -22,6 +22,8 @@ interface Env { | |||
SECRET_STRIPE_WEBHOOK_SECRET: string | |||
SECRET_STRIPE_PRO_PLAN_ID: string | |||
SECRET_STRIPE_GROUP_SEAT_PLAN_ID: string | |||
SECRET_STRIPE_APP_DATA_STORAGE_STARTER_PRICE_ID: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we combine these two into a singular SECRET_STRIPE_APP_DATA_STORAGE_PRICE_IDS containing JSON content representing the same? The second level price IDs (ie. service-specific tiers) don't pollute the env var space too much.
.github/workflows/main-console.yaml
Outdated
@@ -66,6 +67,8 @@ jobs: | |||
SECRET_STRIPE_WEBHOOK_SECRET: ${{ secrets.SECRET_STRIPE_WEBHOOK_SECRET_DEV }} | |||
SECRET_STRIPE_PRO_PLAN_ID: ${{ secrets.SECRET_STRIPE_PRO_PLAN_ID_DEV }} | |||
SECRET_STRIPE_GROUP_SEAT_PLAN_ID: ${{ secrets.SECRET_STRIPE_GROUP_SEAT_PLAN_ID_DEV }} | |||
SECRET_STRIPE_APP_DATA_STORAGE_PRICE_IDS: ${{ secrets.SECRET_STRIPE_APP_DATA_STORAGE_PRICE_IDS_DEV }} | |||
SECRET_STRIPE_APP_DATA_STORAGE_SCALE_PRICE_ID: ${{ secrets.SECRET_STRIPE_APP_DATA_STORAGE_SCALE_PRICE_ID_DEV }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need this at the top level anymore, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, just the PRICE_IDS
Description
Related Issues
Testing
Checklist