I am using InAppBillingPlugin and I am going throu the exceptions to try and see how can I manage purchasing of subscritpions. Now, regarding the code, everything works fine. No need any samples or any code help. My problem is here; I can purchase and consume consumable items but I am wondering how will I deal with subscriptions. When trying to purchase an item already owned, Google Play billing will return an error as followed;
BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED 7 Failure to purchase since item is already owned
which will work fine for checking the subscription I guess.
In the library of jamesmontemagno, the hyperlink above, in the error checking section, this error is not covered. Hence I can not get to know when a user will be able to purchase the subscription again. Without having that error checked, user will be charged everythime he clicks on purchase even if he already owns the purchase. Or is Google Play Billing going to block it since the user has already purchased the subscription and it is still active?
If it is the case, the best thing is to check all the available errors and if it is not in the existing list provided by the library, then take it as already owned item? I know my question is very vague and I am sorry if it confusing. It is confusing for me also.
Link to the library: https://jamesmontemagno.github.io/InAppBillingPlugin/HandlingExceptions.html