User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: urgent, in-app purchases not working?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    929
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    urgent, in-app purchases not working?

    On the latest build 284.10 in-app purchases can no longer get the purchased items.

    This is extremely bad timing, because just a few days ago google decided to change the in-app purchases order id format.

    Before it was "merchantid.orderid" and now it's just "GPA.orderid".
    I was comparing with my merchantid as a way to verify the purchases (about 95% of purchases in my app are scam-attempts).
    So now nobody can buy anything, and they get an error in my game.

    I spent all day yesterday and today figuring out the google api oath authentication, and i have finally managed to create a php script that will communicate with it, and i can verify purchases with google directly.

    Now what i really don't need is a bug in the in-app object to mess up the critical emergency update that i want to release ASAP.

    i loop through the inventory and all the items in the store are listed fine, but it does not retrieve the purchased items:
    08-02 21:39:30.276: I/MMFRuntime(8291): Querying owned items, item type: subs
    08-02 21:39:30.276: I/MMFRuntime(8291): Package name: com.gameyey.flapping
    08-02 21:39:30.276: I/MMFRuntime(8291): Calling getPurchases with continuation token: null
    08-02 21:39:30.280: I/MMFRuntime(8291): Owned items response: 0
    08-02 21:39:30.280: I/MMFRuntime(8291): Continuation token: null
    08-02 21:39:30.280: I/MMFRuntime(8291): Querying SKU details.
    08-02 21:39:30.288: I/MMFRuntime(8291): Ending async operation: refresh inventory
    08-02 21:39:30.288: I/MMFRuntime(8291): Query inventory finished.

    So when i buy an item nothing happens, and when i try to buy it again, we get this:
    08-02 21:42:11.362: I/MMFRuntime(8291): Constructing buy intent for flapping.gema, item type: inapp
    08-02 21:42:11.370: I/MMFRuntime(8291): Unable to buy item, Error response: 7:Item Already Owned
    08-02 21:42:11.370: I/MMFRuntime(8291): Ending async operation: startPurchaseProcess
    08-02 21:42:11.370: I/MMFRuntime(8291): Purchase finished: Result: Unable to buy item (Response: 7:Item Already Owned), purchase: null, iD: 11

  2. #2
    No Products Registered

    Join Date
    Oct 2014
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any progress?

  3. #3
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Hey SoftwareWolf,

    I've been integrating IAP's into the new slots engine the last couple of weeks and it's worked fine thus far. I just did a re-compile today to double-check and purchases work successfully.

    The Response ID 7 means the "buyer" already owns this item. The "buyer" cannot purchase this item again until it is consumed. You must consume the item first before being able to purchase again...

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    SoftWarewolf's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    929
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The problem is that PurchasedQty( "In-App Android" ) returns 0.
    I have the same code/events that worked before, but now it doesn't. Obviously i need to consume the items, the problem is that i can't list which items have been purchased.

    What i am doing is starting a loop PurchasedQty( "In-App Android" ) times, on the 'On Query Inventory Ready' event, and it's 0, even tho i clearly have purchases (since i am getting response 7 if i try to buy again). How do you do it your app? Your setup might be consuming the item directly when purchased rather than listing owned items?
    The InventoryQty( "In-App Android" ) returns all the available purchases correctly, so it's not because i am missing the SKU's.

  5. #5
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    On my initial implementation, I listed the purchased items so I could visually see the purchase going through and being listed.

    Now the testing implementation is done, I just do the purchase and instantly consume, however I do still have the purchase query carried out for logging on an invisible list. It seems to work just fine.

    iap.jpg

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Literswater's Avatar
    Join Date
    Apr 2014
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SoftWarewolf View Post
    The problem is that PurchasedQty( "In-App Android" ) returns 0.
    I have the same code/events that worked before, but now it doesn't. Obviously i need to consume the items, the problem is that i can't list which items have been purchased.

    What i am doing is starting a loop PurchasedQty( "In-App Android" ) times, on the 'On Query Inventory Ready' event, and it's 0, even tho i clearly have purchases (since i am getting response 7 if i try to buy again). How do you do it your app? Your setup might be consuming the item directly when purchased rather than listing owned items?
    The InventoryQty( "In-App Android" ) returns all the available purchases correctly, so it's not because i am missing the SKU's.
    I might have the same problem. InventoryQty( "In-App Android" ) works. I see my item listed .But whenever I want to purchase it, I get the error "The item you requested is not available for purchase". I followed everything in the manual. My product is activated and I've uploaded my app as a beta version in release mode, which I test under another Google Play account than my developer's one. All my events are identical to the examples listed.

    Then I found this thread and downloaded SoftWarewolf's game. I discovered that not only do his IAPs still not work, the exact same error shows up as mine, also at the moment of opening the shop.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    arthurh's Avatar
    Join Date
    Sep 2010
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So in app work or not ?

  8. #8
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Literswater's Avatar
    Join Date
    Apr 2014
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For me it's too soon to draw that conclusion and I'm experimenting a lot. However, I feel convinced that maybe a part that has now become essential is not covered in the manual.

    Just now, my error changed into "cannot be purchased by the developer", which seems very promising. I believe this means that I should be able to make the purchase from another device once I get my hands on one.

    But it's frustrating that I can't figure out what I did with certainty. I think my public app did not have the InApp object in it, nor did it have the Internet permission checked. I published a public version with the InApp object in it but without it actually having any events, and also checked the Internet permission. Afterwards, I uploaded a next version to beta. For some reason, I now got rid of the pesky error.

    I don't understand how it all connects and maybe I was unaware of another thing I did that actually caused it. Maybe the people who struggle with this error could consider follow the steps I took to see if it makes a difference.

  9. #9
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,132
    Mentioned
    152 Post(s)
    Tagged
    3 Thread(s)
    The first message is because the poduct was not populated in all server.

    You as developer cannot buy any product, you need to set a tester account to test and not get charge.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Literswater's Avatar
    Join Date
    Apr 2014
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it to work now.

    I tested and verified that the steps I previously described in my post got rid of the "The item you requested is not available for purchase" error, though I still do not understand how:

    1. Published my app with the complete in-app shop with all its events and the IAP object, but I moved the shop outside the frame so users cannot reach or see
    2. Then made a new version of the app, but with the shop inside the frame
    3. Put this app in beta and assigned tester accounts


    You as developer cannot buy any product, you need to set a tester account to test and not get charge.
    This unfortunately did not seem to be enough though to get rid of "cannot be purchased by the developer". Mobile devices check what account is rooted in its system. It's the first account you setup when using the device for the first time. When that account is the developer's account, test purchases will not work even if you log in Google Play with a test account. I found that there are three ways to solve it:

    • Simply use a device that does not have the developer account as its main account
    • Do a factory reset on your device. Then you can change the main account (but this will also erase all your data first)
    • Root your device and use a root exploder to backup accounts.db, delete it and restart the device (this is what I did)


    My products can now be purchased.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. In-App Purchases not working. Any help please!?!
    By Paul_Boland in forum iOS Export Module 2.5
    Replies: 33
    Last Post: 12th October 2016, 12:11 PM
  2. In-app purchases?
    By pdsoft in forum Android Export Module Version 2.0
    Replies: 23
    Last Post: 25th October 2013, 10:08 PM
  3. In-game purchases, NOT in-app purchases.
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th September 2012, 08:44 PM
  4. GET is working?!? [URGENT PROBLEM]
    By StingRay in forum Android Export Module Version 2.0
    Replies: 10
    Last Post: 20th May 2012, 07:20 AM

Posting Permissions

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