Skip to content

Commit 04c84c3

Browse files
cleanup apis
1 parent 4279aac commit 04c84c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Plugin.InAppBilling/InAppBilling.android.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ public override async Task<IEnumerable<InAppBillingPurchase>> GetPurchasesHistor
218218
_ => ProductType.Subs
219219
};
220220

221+
var historyParams = QueryPurchaseHistoryParams.NewBuilder().SetProductType(skuType).Build();
221222
//TODO: Binding needs updated
222-
var purchasesResult = await BillingClient.QueryPurchaseHistoryAsync(skuType);
223+
var purchasesResult = await BillingClient.QueryPurchaseHistoryAsync(historyParams);
223224

224225

225226
return purchasesResult?.PurchaseHistoryRecords?.Select(p => p.ToIABPurchase()) ?? new List<InAppBillingPurchase>();
@@ -269,7 +270,7 @@ async Task<InAppBillingPurchase> UpgradePurchasedSubscriptionInternalAsync(strin
269270

270271
var updateParams = BillingFlowParams.SubscriptionUpdateParams.NewBuilder()
271272
.SetOldPurchaseToken(purchaseTokenOfOriginalSubscription)
272-
.SetReplaceProrationMode((int)prorationMode)
273+
.SetSubscriptionReplacementMode((int)prorationMode)
273274
.Build();
274275

275276
var t = skuDetails.GetSubscriptionOfferDetails()?.FirstOrDefault()?.OfferToken;

0 commit comments

Comments
 (0)