-
-
Notifications
You must be signed in to change notification settings - Fork 56
Add subscription info to invite emails & endpoint for sending "trial ending soon" emails #2799
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
Conversation
also change other lookup errors to 500s
28b21b2
to
d07d0ab
Compare
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.
Tested on dev, working well. Left a few small suggestions.
also swaps the more explicit org subscription check, since we just fetched an org by its subscription id
this allows a docstring to show up both in LSP outputs & in OpenAPI outputs
to be used when a user has a subscription without a payment method
backend/btrixcloud/subs.py
Outdated
] | ||
) | ||
|
||
return SubscriptionReminderResponse(sent=True) |
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.
Small nitpick: I think should just use SuccessResponse(success=True)
rather than adding a new API response type?
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.
Oh sure, yeah
Closes #2685
Closes #2798
Changes
Testing
Tested in dev alongside https://github.com/webrecorder/cashew/pull/57! All seems to work.
Tested locally by doing the following:
scripts/build-backend.sh
andscripts/build-emails.sh
BTRIX_SUBS_APP_API_KEY
in thebtrix-subs-app-secret
secret by doing the following:uuidgen
to generate onecat '<my secret>' | base64
kubectl edit secrets btrix-subs-app-secret
and paste your encoded secret in theBTRIX_SUBS_APP_API_KEY
field, and save and exithelm upgrade --install -f ./chart/values.yaml -f ./chart/local.yaml btrix ./chart/ && kubectl wait --for=condition=ready pod --all --timeout=300s
subscription
field on the org document in MongoDBI used the following data in MongoDB Compass connected to my local Browsertrix instance:
futureCancelDate
.behavior_on_trial_end
set to both"cancel"
and"continue"
.Follow-ups
Once this is deployed, we should turn off trial end reminder emails from Stripe.