You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The call to GetPurchasesAsync fails with the following on both the simulator and my device when using TestFlight. I have not yet tried it with the published app as I want to make sure this is fixed.
Exception thrown: 'Plugin.InAppBilling.InAppBillingPurchaseException' in System.Private.CoreLib.dll
Error: Plugin.InAppBilling.InAppBillingPurchaseException: Restore Transactions Failed
at Plugin.InAppBilling.InAppBillingImplementation.GetPurchasesAsync(ItemType itemType)
at Waldo.PurchasePage.RestoreItemsPurchased() in /Users/boggs/Documents/Phone Apps/Waldo/Waldo/PurchasePage.xaml.cs:line 482
Version Number of Plugin: 7.1.3
Device Tested On: iPhone 12 mini
Simulator Tested On: iPhone 15
Version of VS: 17.6.1 (device) and 17.5 (simulator)
Version of Xamarin: MAUI 1.3.29
Versions of other things you are using: .Net 8.0.401
Steps to reproduce the Behavior
Simply make the following call:
purchases = await billing.GetPurchasesAsync(ItemType.InAppPurchase);
I have both consumable and non-consumable product IDs. It fails with both. But also my thought is that I only need this for non-consumable since a past purchase of a consumable does not mean anything since they could have "consumed" it already.
NOTE: the documentation shows this function taking two parameters. The second one is "idsToNotFinish". However, there is no such occurrence of this function taking two parameters in the version I am using.
Expected Behavior
I expect the "purchase" object to either be empty or to include a list of the product IDs that have been purchased so that I can iterate through them and setup my UI properly.
Actual Behavior
The call to "GetPurchasesAsync receives the following error and I never get past this call.
Exception thrown: 'Plugin.InAppBilling.InAppBillingPurchaseException' in System.Private.CoreLib.dll
Error: Plugin.InAppBilling.InAppBillingPurchaseException: Restore Transactions Failed
at Plugin.InAppBilling.InAppBillingImplementation.GetPurchasesAsync(ItemType itemType)
at Waldo.PurchasePage.RestoreItemsPurchased() in /Users/boggs/Documents/Phone Apps/Waldo/Waldo/PurchasePage.xaml.cs:line 482
Code snippet
public async Task<bool> RestoreItemsPurchased()
{
var billing = CrossInAppBilling.Current;
try
{
IEnumerable<InAppBillingPurchase> purchases;
var connected = await billing.ConnectAsync();
if (!connected)
{
return false;
}
purchases = await billing.GetPurchasesAsync(ItemType.InAppPurchase);
foreach (InAppBillingPurchase p in purchases)
{
//Set various controls in the UI
SetControlsAfterPurchase(dictProducts.First(z => z.Value.ProductId.Equals(p.ProductId)).Key, false);
}
return true;
}
catch (InAppBillingPurchaseException purchaseEx)
{
//Billing Exception handle this based on the type
Debug.WriteLine("Error: " + purchaseEx);
return false;
}
catch (Exception ex)
{
//Something has gone wrong
return false;
}
finally
{
await billing.DisconnectAsync();
}
}
Screenshotst
The text was updated successfully, but these errors were encountered:
The call to GetPurchasesAsync fails with the following on both the simulator and my device when using TestFlight. I have not yet tried it with the published app as I want to make sure this is fixed.
Version Number of Plugin: 7.1.3
Device Tested On: iPhone 12 mini
Simulator Tested On: iPhone 15
Version of VS: 17.6.1 (device) and 17.5 (simulator)
Version of Xamarin: MAUI 1.3.29
Versions of other things you are using: .Net 8.0.401
Steps to reproduce the Behavior
Simply make the following call:
purchases = await billing.GetPurchasesAsync(ItemType.InAppPurchase);
I have both consumable and non-consumable product IDs. It fails with both. But also my thought is that I only need this for non-consumable since a past purchase of a consumable does not mean anything since they could have "consumed" it already.
NOTE: the documentation shows this function taking two parameters. The second one is "idsToNotFinish". However, there is no such occurrence of this function taking two parameters in the version I am using.
Expected Behavior
I expect the "purchase" object to either be empty or to include a list of the product IDs that have been purchased so that I can iterate through them and setup my UI properly.
Actual Behavior
The call to "GetPurchasesAsync receives the following error and I never get past this call.
Code snippet
Screenshotst
The text was updated successfully, but these errors were encountered: