Skip to content

Conversation

tonidero
Copy link
Contributor

Description

Until now we had a check that threw an exception when trying to purchase using a TestStoreProduct. However, as part of supporting the Test store we want to remove this check. The purchase method would still fail later, when checking the purchase type in the Google/Amazon stores.

null,
callback,
)
purchase(PurchaseParams.Builder(activity, storeProduct).build(), callback)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is unrelated... but I saw that we were using methods that could be made internal in purchasesOrchestrator and took the opportunity to refactor it.

@@ -60,17 +59,6 @@ class PurchaseParams(val builder: Builder) {
constructor(activity: Activity, storeProduct: StoreProduct) :
this(activity, storeProduct.purchasingData, storeProduct.presentedOfferingContext, storeProduct)

private fun ensureNoTestProduct(storeProduct: StoreProduct) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main change in this PR.

@@ -1264,62 +1264,6 @@ internal class PurchasesOrchestrator(
}
}

fun startDeprecatedProductChange(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was unused... So took the opportunity to remove it

@tonidero tonidero marked this pull request as ready for review July 29, 2025 08:10
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.36%. Comparing base (1238da6) to head (26fc198).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2570      +/-   ##
==========================================
+ Coverage   78.26%   78.36%   +0.09%     
==========================================
  Files         291      291              
  Lines       10784    10746      -38     
  Branches     1507     1501       -6     
==========================================
- Hits         8440     8421      -19     
+ Misses       1692     1673      -19     
  Partials      652      652              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit 5eb75e8 Jul 29, 2025
20 checks passed
@tonidero tonidero deleted the remove-test-product-purchase-check branch July 29, 2025 10:57
tonidero pushed a commit that referenced this pull request Aug 1, 2025
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* Add lifetime badge to customer center (#2565) via Cesar de la Vega
(@vegaro)
### Customer Center
#### ✨ New Features
* Introduce custom actions for customer center (#2572) via Facundo
Menzella (@facumenzella)

## RevenueCatUI SDK
### ✨ New Features
* Add support for az-AZ locale (#2575) via Franco Correa
(@francocorreasosa)
### Customer Center
#### 🐞 Bugfixes
* Display latest expired subscription if no active subscriptions (#2564)
via Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* Expose getStorefront APIs in CustomEntitlementComputation flavor
(#2579) via Toni Rico (@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2578) via RevenueCat Git Bot (@RCGitBot)
* Add missing dokka-hide-internal tests to CI and fix reported number of
tests (#2569) via Cesar de la Vega (@vegaro)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2574) via RevenueCat Git Bot (@RCGitBot)
* Convert WebBilling products into TestStoreProducts (#2573) via Toni
Rico (@tonidero)
* Add WebBillingGetProducts endpoint (#2571) via Toni Rico (@tonidero)
* Remove TestStoreProduct purchase check (#2570) via Toni Rico
(@tonidero)
* Improve 9.0.0 changelog (#2568) via Toni Rico (@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2567) via RevenueCat Git Bot (@RCGitBot)
* Parallel test jobs (#2549) via Cesar de la Vega (@vegaro)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
tonidero added a commit that referenced this pull request Aug 25, 2025
Until now we had a check that threw an exception when trying to purchase
using a TestStoreProduct. However, as part of supporting the Test store
we want to remove this check. The purchase method would still fail
later, when checking the purchase type in the Google/Amazon stores.
@tonidero tonidero mentioned this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants