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

Fix productIdentifier being a list #90

Merged
merged 3 commits into from
Aug 26, 2021
Merged

Fix productIdentifier being a list #90

merged 3 commits into from
Aug 26, 2021

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Aug 26, 2021

Since we added BillingClient 4 support, purchase has a skus property. We were assigning productIdentifier to the whole list of skus instead of getting the first one.

@vegaro vegaro changed the title Fix productIdentifier not being Fix productIdentifier being a list Aug 26, 2021
@vegaro vegaro requested a review from a team August 26, 2021 20:47
@@ -347,7 +347,8 @@ private fun getPurchaseCompletedFunction(onResult: OnResult): (Purchase?, Purcha
return { purchase, purchaserInfo ->
onResult.onReceived(
mapOf(
"productIdentifier" to purchase?.skus,
// Get first productIdentifier until we have full support of multi-line subscriptions
"productIdentifier" to purchase?.skus?.get(0),
"purchaserInfo" to purchaserInfo.map()
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should add a test that would have failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! I will add one. Thanks for reminding me

@vegaro vegaro merged commit 489ce8d into main Aug 26, 2021
@vegaro vegaro deleted the productidentifier-issue branch August 26, 2021 22:30
@vegaro vegaro mentioned this pull request Aug 26, 2021
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