Fix amazon zero price#1634
Merged
Merged
Conversation
vegaro
commented
Mar 6, 2024
| // Amazon purchases don't have subscription options | ||
| // Amazon is the only store that has marketplace | ||
| // We want Google restores to enter in this if, that's why we need to filter Amazon only | ||
| if (transaction.type == ProductType.SUBS && transaction.marketplace == null) { |
Member
Author
There was a problem hiding this comment.
I thought about just removing the else and checking if purchasedStoreProduct is null and in that case doing:
storeProducts.firstOrNull { product ->
product.id == transaction.productIds.firstOrNull()
}
But I worry about restored purchases, which also don't have subscription options, and right now we are also getting a purchasedStoreProduct for them. That might be another bug, or expected behavior.
So I went with checking transaction.marketplace == null which is a proxy for checking if the store is Google. So if it's Amazon, or consumables, it will go into the else.
joshdholtz
approved these changes
Mar 6, 2024
joshdholtz
left a comment
Member
There was a problem hiding this comment.
Two small comments but otherwise looks good 👍
aboedo
approved these changes
Mar 7, 2024
|
Thank you very much for getting this fixed! |
vegaro
added a commit
that referenced
this pull request
Mar 7, 2024
We were never posting prices for Amazon purchases, because when we try to find the purchased product, we where using the `subscriptionOptions` property, which is always null for Amazon This fix is a bit hacky right now, but we need to ship it quickly
vegaro
added a commit
that referenced
this pull request
Mar 7, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were never posting prices for Amazon purchases, because when we try to find the purchased product, we where using the
subscriptionOptionsproperty, which is always null for AmazonThis fix is a bit hacky right now, but we need to ship it quickly