User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: Some InApp purchases failing to acknowledge

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Hyoct's Avatar
    Join Date
    Jan 2020
    Location
    Somewhere in Earth
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Some InApp purchases failing to acknowledge

    Hey there, I'm experiencing some issues with the acknowledging process of one-time purchases. While some purchases are being acknowledged perfectly fine, other are getting refunded within 3 days. I am aware this happens whenever your app fails to acknowledge the SKU. I found this odd since it isn't happening in all of them, but about half of the purchases. Because of this scenario, I thought this could've been caused because of the code only sending an acknowledge request once when the sku is bought, leaving it open to failure. (i.e that one acknowledge request fails for whatever reason and it is not sent again, therefore the purchase is left unacknowledged and refunded within 3 days.)
    The old code flow used to go like this:

    Code:
    * User clicks with left button on Active 16
    + premium = 0
    	 In-App Android : Purchase SKU:"utcpremium" with Id:1
    
    * In-App Android: Purchase Id:1 was Ok
    	 Ini : Set value 1 to item "premium"
    	Special : Set premium to ItemValue( "Ini", "premium" )
    	 In-App Android : Acknowledge SKU:"utcpremium" with Id:1
    
    * In-App Android: Purchase Id:1 was acknowledged
    	 In-App Android : Query purchases
    As you can see, it only sends an acknowledge request ONCE when the purchase was OK. As I mentioned, this works for some of the purchases yes, but other are failing for whatever reason and get refunded later on.

    I came up with this solution that I'm still not fully convinced of
    Code:
    * User clicks with left button on Active 16
    + premium = 0
    	 In-App Android : Purchase SKU:"utcpremium" with Id:1
    
    * In-App Android: Purchase Id:1 was Ok
    	 Ini : Set value 1 to item "premium"
    	Special : Set premium to ItemValue( "Ini", "premium" )
    	 In-App Android : Query purchases
    
    * premium = 1
    + In-App Android: Is Sku "utcpremium" purchased
    + NOT In-App Android: Is Sku="utcpremium" acknowledged
    	 In-App Android : Acknowledge SKU:"utcpremium" with Id:1
    
    * In-App Android: Purchase Id:1 was acknowledged
    	 In-App Android : Query purchases
    What this does is send acknowledge requests as long as the sku is purchased but isn't acknowledged, until it becomes acknowledged. So if the first fails for whatever reason, another one is sent. (Because it failed to acknowledge, therefore the condition remains true)

    I'm still hesitant on this, so I was wondering if this may fix the issue? If it isn't the case, what would and why does it happens?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    973
    Mentioned
    38 Post(s)
    Tagged
    0 Thread(s)
    Hello, What is the point for doing the acknowledge SKU part after everything has already been granted to the user? Then you trigger a query purchase, but why?
    I'm sorry, i'm completly lost with the new items they added to In-App, actually i'm still using the previous workflow and it's still working, i guess.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Hyoct's Avatar
    Join Date
    Jan 2020
    Location
    Somewhere in Earth
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I didn't get it at first either, but apparently it's a way of telling Google Play servers that things were in fact granted to the user. I believe it's an extra security measure.
    I do the query purchases thing to "refresh" the in-app system to prevent unexpected behavior or errors overall. (my game has an anti piracy screen so I'd rather keep things updated)
    If you don't acknowledge a purchase within the first 3 days in billing library V4, it gets automatically refunded. That's the issue some of my purchases are experiencing, while other aren't.

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Hyoct's Avatar
    Join Date
    Jan 2020
    Location
    Somewhere in Earth
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Update: It doesn't seem to have worked. Do you have to include the whole package when listing a SKU in the InApp object? (i.e "com.hyoct.utcpremium" instead of "utcpremium") I noticed this was the way SKUs were being referred to in the latest example mfa, so perhaps this could be the root of the issue.
    I also thought of updating the purchase flow so it grants the user the rights once it was purchased, instead of when purchase went OK, as in the pdf guide. Though I'm not sure this will work either.

    I still don't explain myself why this only happens to some purchases and not all of them, and I feel like i'm running out of options. If someone knows the solution to this, sharing would be appreciated.

  5. #5
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    tk22's Avatar
    Join Date
    Dec 2014
    Posts
    143
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    I have only recently implemented the new required changes to use the Android IAP. I have used the SKU without the package and it seems to be working properly the purchase goes through and the acknowledgment as well. However, I have noticed an error that happens sometimes in two points of the flow:
    1-during the Query SKU details
    2-during acknowledgment

    Error 12: Another async operation is in progress.

    To solve this I did request timeout if it fails to get the info it would request again
    same thing with the acknowledgment it would attempt it again

    So my suggestion is to to add a List object and add to it all error messages you receive and see if that is the case or some other error. The help file has a all the errors number and short explanation of each Hopefully that helps!

    We are really in strong need of an example that shows the new system using best practices and maybe have the help file explain some things better for example why do we need to query again after acknowledgment and how to use the id values to concatenate as mentioned here: "The Id value is a number that allows concatenating the conditions that result from the actions executed. ". how to use "On Store Notification" and more!

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    973
    Mentioned
    38 Post(s)
    Tagged
    0 Thread(s)
    It seems that the acknowledgement is required only for lifetime products or subscriptions. It's why oi don't get any error with my last game as it's all auto-consumme products.
    But on one of my previous game i have an item that is a lifetime item. And even by reading the doc, i don't know what to do. Because, before the acknowledge thing, i used "is sku purchased" so it was also working when an user restore his purchases. But now, i need to wait for the acknowledge to grant the item, ok, but when the user will do a restore, will it trigger the acknowledge again?

    For example, if i grant the product simply on "is sku purchased", restore will work, but the user will get the item even if it's refund. But he will not be able to restore it if he delete the game of course.
    If i grant the product on "Purchase was acknoledged", then restore will never work, but the user will get the item only when Google will validate the order.

    So, yay, an example is really welcome!

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Hyoct's Avatar
    Join Date
    Jan 2020
    Location
    Somewhere in Earth
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the answers! How'd you exactly request a timeout with the acknowledgement? Would it be something like this?

    Code:
    [ test ]
    
    	* Every 01''-00
    	+ In-App 01: Is Sku "utcpremium" purchased
    	+ NOT In-App 01: Is Sku="utcpremium" acknowledged
    		Special : Add 1 to timeout
    
    	* timeout = 3
    		Special : Activate group "acknowledge"
    
    	[ acknowledge ]
    
    		* Group "acknowledge" is activated
    		+ Only one action when event loops
    			 In-App 01 : Acknowledge SKU:"utcpremium" with Id:1
    			Special : Set timeout to 0
    			Special : Deactivate group "acknowledge"

  8. #8
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    7,295
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    here is this sub part of the page to explain both case, persistent managed item and consumable item (which does not require acknowledged) or you do.

    Note the possible error you may have is when using query purchase, and you get stuck because the purchase is empty (if you consumed your items) then you must use On Error & error = 17 to check empty purchase return, or quantity = 0

    New version with subscription incorporating latest deep link also have a condition on empty purchases


    https://developer.android.com/google/play/billing/integrate#process






    Regards,


    Fernando Vivolo

    ... new things are coming ...

  9. #9
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    tk22's Avatar
    Join Date
    Dec 2014
    Posts
    143
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hyoct View Post
    Thanks for the answers! How'd you exactly request a timeout with the acknowledgement? Would it be something like this?

    Code:
    [ test ]
    
    	* Every 01''-00
    	+ In-App 01: Is Sku "utcpremium" purchased
    	+ NOT In-App 01: Is Sku="utcpremium" acknowledged
    		Special : Add 1 to timeout
    
    	* timeout = 3
    		Special : Activate group "acknowledge"
    
    	[ acknowledge ]
    
    		* Group "acknowledge" is activated
    		+ Only one action when event loops
    			 In-App 01 : Acknowledge SKU:"utcpremium" with Id:1
    			Special : Set timeout to 0
    			Special : Deactivate group "acknowledge"
    Yes this should work

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    973
    Mentioned
    38 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tk22 View Post
    Yes this should work
    I'm sorry but this does nothing at all.
    All it does is to trigger the acknowledge once, like it was already done in it's original version. Deactivating the group will not stop the command, it's triggered and then managed by Google Servers.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. INAPP purchases (HTML5) stripe integration?
    By robbie778 in forum Fusion 2.5
    Replies: 0
    Last Post: 29th January 2018, 02:26 PM
  2. Replies: 0
    Last Post: 5th September 2017, 11:08 PM
  3. Replies: 1
    Last Post: 21st July 2016, 12:45 AM
  4. Question about how inApp purchases are saved?
    By Outcast in forum Android Export Module Version 2.0
    Replies: 9
    Last Post: 8th August 2014, 04:21 PM
  5. I can't do Inapp purchases anymore, please help :/
    By Outcast in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 10th December 2013, 05:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •