Some in app billing v3 questions

gadgetmonster

Active Member
Licensed User
Longtime User
Hi All

I am implementing in app billing to unlock the trial version to the full version and I would just like to clarify a couple of things.

1. On my purchase button I use the following code:

B4X:
Main.manager.RequestPayment("xxxxx", "inapp", "A description")

Should xxxxx be the product ID you assigned to the in app product?

2. Once a purchase has been made, am I right in thinking that the event manager_PurchaseCompleted is called and if Success then the user has purchased the product?

3. If success, then I write out a flag to the database that says its the full version. I use this when starting my app to check.

4. What happens if a customer obtains a refund through Google Play as my app will still have a flag set in the database. Do I have to periodically check to see if the purchase has been cancelled, if so, do I use manager.GetOwnedProducts to do this?

Thank you in advance.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
What happens if a customer obtains a refund through Google Play as my app will still have a flag set in the database. Do I have to periodically check to see if the purchase has been cancelled, if so, do I use manager.GetOwnedProducts to do this?

You can check the state of the owned products when your app starts. Do note that as mentioned here: android - Handling In-App Billing Refunds in v3 - Stack Overflow it can take a while till the state is updated.
 
Upvote 0
Top