InAppBillingPlugin: Upgrading Plugin.InAppBilling from 3.0.0-beta to 3.1.0-beta causes purchase error (Android)

After upgrading Plugin.InAppBilling from 3.0.0-beta to 3.1.0-beta, it’s no longer possible to purchase products on my Android version of the app. The user always gets a error message. Is there something else todo beside the NuGet package upgrade and the removal of InAppBillingImplementation.HandleActivityResult(requestCode, resultCode, data); from OnActivityResult(int requestCode, Result resultCode, Intent data)? Or is this a actual bug?

Restoring seems to work so I’m not sure what causes this on new purchases. Just tested it with 3 devices.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (17 by maintainers)

Most upvoted comments

If we don’t follow the recommended procedure with pending purchases we might be giving our in-app products away for free to those who want to pay outside the app. This is a small group of users of course (unless it becomes common knowledge!).

  • If the result of PurchaseAsync is PurchaseState.PaymentPending, store the order details locally and inform the user that they will have access to the product when the payment completes
  • When the user starts the app (and/or visits a particular page), if the stored PurchaseState is PaymentPending, call GetPurchasesAsync and query the result for a purchase that matches the stored purchase.
  • If the PurchaseState for this purchase is still PaymentPending, show the same no-access message
  • If the PurchaseState is Purchased, call ConsumePurchaseAsync or AcknowledgePurchaseAsync, depending on the product type

I’ve excluded any verification you might do on your own server, if applicable.

I would like also to ask soemthing about the beta version.

Im using 3.10 beta too and i see things have changed from the time the documentation https://jamesmontemagno.github.io/InAppBillingPlugin/ was written. for example billing.ConnectAsync() now only takes bool as parameter. I want to ask this: should i use the stable version for now or try to use the 4.0 version. For the 4 version we dont have for now documentation, am i right? If i use the current stable version do we know any ETA that my inapp purchases will stop working? Thanks

EDIT: here it says https://www.youtube.com/watch?v=Cj5vq1AOJeQ&list=PLWz5rJ2EKKc_xXXubDti2eRnIKU0p7wHd&index=57&t=570s that Google Play Billing 2.x will be mandatory on May 1 2021. I think the 3.0 version of InAppBilling is using 2.x so we are good for more than one year

@Sebastian1989101 In the test environment, if the purchase is not acknowledged or consumed within 5 minutes, it is refunded. In production, we have 3 days to acknowledge or consume. It was clearly identified as a ‘test’ purchase.