-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add fields required for Guardian Ad Lite thank you email #6642
Conversation
|
||
object GuardianLightSubscriptionBuilder { | ||
// The user isn't charged until day 15 | ||
val gracePeriodInDays = 15 |
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.
Pulled this out to make it easy to share with the code which builds the email fields.
Size Change: 0 B Total Size: 2.23 MB ℹ️ View Unchanged
|
"email_address" -> state.user.primaryEmailAddress, | ||
"billing_period" -> state.product.billingPeriod.toString.toLowerCase, | ||
"first_payment_date" -> formatDate( | ||
created.plusDays(GuardianLightSubscriptionBuilder.gracePeriodInDays).toLocalDate, |
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.
@rupertbates this date logic is also here. I'm sharing the grace period value but I wonder if there's a better way of doing this? Any thoughts?
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.
I think that's fine
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.
Looks good 👍
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.
👍
Seen on PROD (merged by @tjmw 11 minutes and 17 seconds ago)
Sentry Release: support-client-side, support |
What are you doing in this PR?
This PR adds the fields required for the thank you email. These will be provided as API trigger properties to the Braze campaign.
Trello Card
Why are you doing this?
Currently Guardian Ad-Lite emails are not configured and we want to send thank you emails to users who purchase.
How to test
I've deployed this PR and guardian/membership-workflow#561 to CODE and made a purchase. The email triggered successfully.
How can we measure success?
Have we considered potential risks?
Accessibility test checklist
Screenshots