In OnProductPurchaseCompleted event what response code indicates that was successful purchase?
First, I am assuming you are using the Xamarin.InAppBilling component. Is so there are a couple of things to check.
1) Ensure that you are calling the HandleActivityResult method of the BillingHandler in the OnActivityResult method of the Activity that initiated the purchase. See:
protected override void OnActivityResult (int requestCode, Result resultCode, Intent data)
// Ask the open service connection's billing handler to process this request
_serviceConnection.BillingHandler.HandleActivityResult (requestCode, resultCode, data);
// TODO: Use a call back to update the purchased items
// or listen to the OnProductPurchaseCompleted event to
// handle a successful purchase
2) With that in place monitor the InAppBillingProcessingError event of the BillingHandler. It will be raised if there are any issues with the purchase.
3) If OnProductPurchaseCompleted event is raised then the product or subscription was successfully processed by Google Play Services.
4) The OnPurchaseFailedValidation event will be raised if the product does not validate after purchase.
You can compare the PurchaseState property of the Purchase object to the properties of the BillingResult static class to decode.
Here it what it breaks down to however:
Please let me know if you need anything else.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies