jamesmontemagno / InAppBillingPlugin

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

Annual subscription expired - purchasing new subscription requires 2 calls to PurchaseAsync() #514

Open WaynesWrld22 opened 1 year ago

WaynesWrld22 commented 1 year ago

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Version Number of Plugin: 6.7.0 Device Tested On: iPhone 12 Pro Max Simulator Tested On: None Version of VS: VS2022 for Mac - v17.4.2 Version of Xamarin: 16.1.1.27 Versions of other things you are using:

Steps to reproduce the Behavior

1) Create an annual subscription on Apples Dev website 2) Purchase an Annual subscription in your app using InAppBillingPlugin - use billing.PurchaseAsync(prodId, ItemType.Subscription) 3) Confirm App runs as expected with valid subscription 4) Set the device down and don't use it for 13 hours or more(guarantees the annual subscription has expired on Apples side) 5) Start the App up the next day - Find the last annual subscription that has expired. Let the user purchase a new subscription. 6) Call billing.PurchaseAsync(prodId,ItemType.Subscription) and billing component immediately returns the purchased item WITHOUT the Apple billing dialog coming up. Returns an item, like something has been purchased but it hasn't! 7) Close and restart the app. Again the code find the last transaction, an expired subscription and offers the user to buy subscription again. 8) This time the call to billing.PurchaseAsync(prodId,ItemType.Subscription) makes the Apple billing dialog pop up. Click subscribe, enter password and confirm testing subscription(no cost). Process completes, a new subscription is purchased as expected.

Expected Behavior

Any call to billing.PurchaseAsync should pop up the Apple purchasing dialog

Actual Behavior

First call to billing.PurchaseAsync after a subscription has expired DOES NOT pop up the Apple subscription dialog. It acts like it is trying to restore a purchase instead of creating a new one.

Code snippet

I can provide code if needed but I think this can be seen easily using the out of box code provided you follow the steps noted above. Let me know if you need code snippets and I'll try to cull it out and distill it to the relevant pieces.

Screenshotst

Again, can provide if it is not easily reproduced in your testing.

satish-dnv commented 1 year ago

@WaynesWrld22/ @jamesmontemagno We are also experiencing same kind of issue. But we are using monthly subscription. We cancelled the subscription and it is expired one month ago (Nov-8). But, we can still login the application. The application is not calling the PurshaseAsync method to make a new purchase. The InAppBilling version which we are using is 5.6.1.