Skip to content

implement GalaxyBillingWrapper.queryPurchases()#2969

Merged
fire-at-will merged 3 commits into
samsung-devfrom
query-purchases
Dec 23, 2025
Merged

implement GalaxyBillingWrapper.queryPurchases()#2969
fire-at-will merged 3 commits into
samsung-devfrom
query-purchases

Conversation

@fire-at-will

Copy link
Copy Markdown
Contributor

Description

This PR:

  • Implements queryPurchases(), which is used when posting pending receipts
  • Calls purchasesUpdatedListener?.onPurchasesFailedToUpdate() in makePurchaseAsync() when making a product change, which is currently unsupported

@fire-at-will fire-at-will requested a review from a team as a code owner December 22, 2025 23:19
@fire-at-will fire-at-will added the pr:feat A new feature label Dec 22, 2025

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Just some questions, but I'm ok getting this merged for now.

val storeTransactions = ownedProducts
.filter {
// TO DO: Find out what this returns for OTPs when we support OTPs
it.subscriptionEndDate.parseDateFromGalaxyDateString() > dateProvider.now

@tonidero tonidero Dec 23, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm does Galaxy store return all expired subscriptions always? Sad we have to do the filtering locally (time could be modified client side, which could be problematic...). But not familiar if there is a better way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Their docs say:

getOwnedList() returns a list of in-app products that the app user currently has from previous purchases

In sandbox, purchases disappear here once they expire, so it probably isn't necessary, but I included this since we don't really know what will happen in production and it looked like we were doing something similar for Amazon

Comment thread purchases/src/main/kotlin/com/revenuecat/purchases/galaxy/GalaxyBillingWrapper.kt Outdated
@fire-at-will fire-at-will merged commit a568cdb into samsung-dev Dec 23, 2025
2 of 19 checks passed
@fire-at-will fire-at-will deleted the query-purchases branch December 23, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants