Can't purchase product from MAUI app in Microsoft Store
RichLamb opened this issue · comments
Hi,
The purchase from the Apple Store works fine with the plugin, but I am having problems with the MAUI app.
I have my app set as Free, with one Add On in the app store. I've verified that the Add On is available using the Windows.Services.Store API.
When I try to purchase the Add On using the code below, the call to PurchaseAsync() returns immediately with a null value.
The "id" I pass in is the StoreID for the Add On as found on the Microsoft Store and also when I use the above Windows API.
var connected = await CrossInAppBilling.Current.ConnectAsync();
if( !connected)
{
await App.Current.MainPage.DisplayAlert(string.Empty, "Can't connect to the store", "OK");
}
var purchase = await CrossInAppBilling.Current.PurchaseAsync(id, ItemType.InAppPurchase);
The code is in embedded in a try/catch block, and the catch is set to capture Exception, so it should catch all(?) exceptions.
Is there something basic that I'm missing with the Microsoft Store useage?
Thanks in advance for your help, and for this excellent Plugin!
Rich
You can check: https://github.com/jamesmontemagno/MyStreamTimer code... i am using it in there. That code hasn't changed in a LONG time