jamesmontemagno / InAppBillingPlugin

Cross-platform In App Billing Plugin for .NET
MIT License
581 stars 145 forks source link

CrossInAppBilling.Current.PurchaseAsync return exception "Invalid products found when querying product list" #594

Open dbdariusz opened 2 months ago

dbdariusz commented 2 months ago

Bug Information

Version Number of Plugin: 7.1.0 Device Tested On: iphone 14, ios 17.3.1 app via testflight

Steps to reproduce the Behavior

  1. I created net maui blazor hybrid app
  2. Created In-App Purchases consumable and Non-Renewing Subscriptions. Stored product ids.
  3. Added method in the code to purchase an item for In-App Purchase (test01) and Non-Renewing Subscription (test02)
  4. Published an app to app store
  5. In test01 and test02 I always getting error InAppBillingPurchaseException and do not sure why. Product ids exists in app store. I was able publish app with correct provision profile. So not sure what is missing.

Expected Behavior

Method should allow to buy a product.

Actual Behavior

Error

Code snippet

//test01 try{ var productIdSub = "gfl_0299_1w_01"; var purchase = await CrossInAppBilling.Current.PurchaseAsync(productIdSub, ItemType.InAppPurchaseConsumable); } catch (InAppBillingPurchaseException purchaseEx) { } //test02 try{ var productIdSub = "gfl_0299_1w_02"; var purchase = await CrossInAppBilling.Current.PurchaseAsync(productIdSub, ItemType.Subscription); } catch (InAppBillingPurchaseException purchaseEx) { }

pulmuone commented 2 months ago

ProductID on iOS uses this value. ios

dbdariusz commented 2 months ago

I think I am using product id from proper place. Is not that place? I have problem to localize place from your printscreen. What is path to there? Is not product id from particular subscription or in app purchase? image

pulmuone commented 2 months ago

The reason is that “Status = Ready To Submit”. It has not yet been approved by Apple. ios2

dbdariusz commented 2 months ago

But I am doing test on TestFlight. For that purpose I think I do not need to submit. Am I correct?

pulmuone commented 2 months ago

But I am doing test on TestFlight. For that purpose I think I do not need to submit. Am I correct?

It has nothing to do with the status of your app's TestFlight and subscription information. Even if it's TestFlight, your subscription information must be marked as "Approved."

pulmuone commented 2 months ago

If you tell me your email address, I will send you a video of my settings screen.

my email : gwise.vision@gmail.com

dbdariusz commented 2 months ago

Are you saying to test app via TestFlight my subscription must be approved? Is there a way to test payments with sandbox account when status is not approved?

pulmuone commented 2 months ago

Are you saying to test app via TestFlight my subscription must be approved? Is there a way to test payments with sandbox account when status is not approved?

Your subscription settings must be approved by Apple.

Novotnde commented 2 months ago

I also have this issue, but I was told by apple team that first you must test them and then submit app for aproval. I still haven't managed to get the product to display. Have you managed to get them loaded in test flight?

dbdariusz commented 2 months ago

I also have this issue, but I was told by apple team that first you must test them and then submit app for aproval. I still haven't managed to get the product to display. Have you managed to get them loaded in test flight?

I have app available in test flight but I cannot test there subscription. Based on pulmuone subscription must be first approved by Apple. I am not sure yet if if there is a way to approve subscription without approving distribution itself. Is there? If no, that will be tricky to ask Apple to review app with subscription which were not tested in TestFlight. Am I missing something? How to send subscription to review?

mpcreza commented 1 month ago

you must sign the Paid Applications Agreement. go to AppStoreConnect -> Businees