Skip to content
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

chore: add missing course properties in IAP restore & unfulfilled events #82

Open
wants to merge 2 commits into
base: 2U/develop
Choose a base branch
from

Conversation

farhan-arshad-dev
Copy link
Member

Description

  • Add Properties in IAP Restore and Unfulfilled Events.

Jira: LEARNER-10309

@farhan-arshad-dev farhan-arshad-dev changed the title 2 u/farhan ar/learner 10309 chore: add missing course properties in IAP restore & unfulfilled events Jan 13, 2025
Copy link

@HamzaIsrar12 HamzaIsrar12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have four additional improvements to address that I forgot to mention in the underline ticket:

  • Ensure the unfulfilled flow functions correctly, even when there's only a single course.
  • Trigger CourseUpgradeSuccess regardless of the user's choice on the Unfulfilled Refresh-or-Continue dialog.
  • Include these properties in the CourseUpgradeSuccess event during the unfulfilled flow.
  • Since the flow sends only one event for all unfulfilled courses, it's better to limit it to one process per session or click to ensure the correct number of CourseUpgradeSuccess events are sent.

Thank you!

purchases.filter { it.accountIdentifiers?.obfuscatedAccountId?.decodeToLong() == userId }
val userPurchases = purchases.filter { purchase ->
val userAccountId = purchase.accountIdentifiers?.obfuscatedAccountId?.decodeToLong()
val storeSku = purchase.accountIdentifiers?.obfuscatedProfileId?.decodeToString()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use Purchase.getCourseSku() extension function here.

Comment on lines +131 to +133
val courseVerified = enrolledCourses.find { enrolledCourse ->
enrolledCourse.productInfo?.courseSku == purchase.getCourseSku()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is same as above.

Comment on lines +24 to +26
suspend fun send(event: EnrolledCourseEvent) = channel.emit(event)

suspend fun send(event: RequestEnrolledCourseEvent) = channel.emit(event)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should rename them and place them in IAPNotifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants