1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

OFFICIAL GMS2 IAPs Updates 2.2.4 Feedback

Discussion in 'GameMaker Studio 2 Community Tech Support' started by rmanthorp, Sep 11, 2019.

Thread Status:
Not open for further replies.
  1. rmanthorp

    rmanthorp YoYo Games Staff Admin YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    306
    Updated IAP Support For Google Play, Amazon, and all Apple platforms
    • Updated the Google IAPs extension and created new Amazon IAPs and Apple IAPs extensions - you now need to use these for all IAP functionality (these won't work with older runtimes)
    • Added support for subscriptions on all of these platforms
    • Added support for communication with external payment verification servers (note that Amazon requires you to use your own web server for verifying all IAPs)
    • Added support for local verification of receipts on some stores (not Amazon and not for any subscriptions - all stores require a custom web server for subscriptions)
    • Note that whilst verification (local or remote) is technically optional we would recommend you always use this!
    • Removed all functionality from the old iap_...() functions built-in to the runner - these now only debug message to the console that you shouldn't use that function

    Please note that the release notes and the guides linked-to below all mention several new or updated extensions are required for use with 2.2.4 - these are downloadable HERE until the Marketplace has been updated.

    The Marketplace will not be updated with these new extension versions until 2.2.4 is out fully!

    Helpdesk Setup Guides can be found here:
    Changes to the In-Built IAP Functionality for GMS2 2.2.4 Release (an overview guide)
    Amazon: Setting Up IAPs
    Android: Google Play Billing
    macOS: Using The IAP Extension

    iOS and tvOS: Using The IAP Extension
     
    Last edited by a moderator: Sep 13, 2019
    rIKmAN likes this.
  2. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    Please be aware that this is a VERY extensive change to IAP functionality and requires some admittedly quite convoluted and complex code. Accordingly, if you file a ticket about this ALWAYS add a sample yyz archive (not just the .yyp file, please!) so we can see what you're doing.

    Note that we can't offer any support for setting up or diagnosing issues in your custom payment server. We would recommend setting up your IAP code using local verification (when possible) and prove your "gameplay integration" seems to be working, then move to using a custom payment server. In this way, you will already know the routes through your game code are fairly solid, and now it's just about treating the HTTP events back from your server correctly.

    We would not recommend releasing your projects with local verification still in place if you can avoid doing this - and of course we would not recommend releasing with no verification at all...
     
  3. SIG.

    SIG. Member

    Joined:
    Aug 12, 2019
    Posts:
    35
    The new iOS IAP article notes that IAPs must be validated using either one's own server or a locally stored Apple Root Certificate.

    How is it that iOS IAPs are currently functioning without this validation?
     
  4. Ricardo

    Ricardo Member

    Joined:
    Jun 20, 2016
    Posts:
    190
    Edit: whoops, wrong thread.
     
  5. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,613
    If IAP now requires the use of custom payment servers, shouldn't there be some guidelines or basic example for building that alongside GML-side instructions? Given how often I call people out on completely inappropriate HTTP programming practices around here, this is a disaster waiting to happen. Is YoYo willing to let PHP amateurs on the GMC lead others astray again (alert: most of them can't even keep the most basic SQL injections out), this time with real money and payment details in the mix? Can't the web dev team help out?
     
    Last edited: Sep 11, 2019
  6. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,989
    Each of the marketplaces that the IAP extensions target provide their own tutorials that cover the creation and use of a server for verification. These cover things in far more detail than we could given that they are written by Google/Amazon/Apple themselves, and they have been linked to in the different documentation associated with the extensions. It would be pointless, time consuming and error-prone for us to duplicate this documentation, and it would also be impossible for us to give a "one size fits all" solution for each platform and game. Note that the use of a server on Apple and Google Play is not required, it's just a recommendation and local verification is still possible. It's only Amazon that 100% require this, but they also provide extensive documentation on how this can be done (which is linked to in the manual for the extension and in the accompanying article).
     
  7. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    The current implementation on iOS (and the other stores) predates the more sophisticated IAP verification systems included nowadays - that's why we have done this significant update. Previously, on all stores you were required to either do simple in-game checks or rely on an external payment server for everything.
     
  8. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    A download link for all the IAP extensions has now been added to the first post in this thread ("HERE").
     
  9. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,661
    @Dan are there going to be any updates to the Facebook Instant Games extension, specifically regarding IAP / monetisation support?
     
  10. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    416
    I've finished the Facebook Instant Games extension and currently writing the documentation.
    IAPs & Ads are included (Works both on Web and Mobile : IAP system doesn't work on iOS due to Apple's policy)
    The extension includes everything that IG platform offers.
     
    rIKmAN likes this.
  11. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,661
    Oh sweet, that's awesome Mert!
    What do you have to do on iOS, go through Apple for the payment or is it just not possible?

    I'll probably see the post when you make one, but feel free to @ me in it when you do if you remember! :)
     
    Mert likes this.
  12. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    416
    Hi. Unfortunately, some of the functionalities of Facebook IG platform are restricted, due to Apple's policy. IAPs, cross-promotions(you switch to another game and can pass values to that game) and some of the other things are restricted only on iOS.

    I'll post the extension soon.
     
  13. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,661
    Hmm that's a shame, will have to look into a little more and see what the usual practice for FBIG stuff is with regards to the Apple policy.
    Seems a massive userbase / platform to not be able to monetize it at all.

    Thanks for making it, take your time! :)
     
  14. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    Right now, we are only updating these platforms. We'll announce if/when more platforms are getting IAP support.

    Awesome work on the extension!
     
  15. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    Anyone tried the new IAPs extensions yet? Any issues?
     
  16. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    I'm currently working on implementing them into one of my apps. I'll update with the results soon! Test purchases are working!
     
  17. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    Great to hear that - thanks for the update!
     
  18. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
  19. chorrus

    chorrus Member

    Joined:
    Jun 21, 2016
    Posts:
    111
    Hey Dan! I have just started updating IAPs on iOS. I do have an issue, when I try to buy anything it asks me to log in instead of the regular in app purchase dialogue. This would discourage many users from actually buying anything. Any idea about what might be happening?
     
  20. chorrus

    chorrus Member

    Joined:
    Jun 21, 2016
    Posts:
    111
    Hi! Updating them in my game is being a nightmare, haven't tried in android yet but it isn't working fine on iOS, is it working for you on iOS?
     
  21. spinout

    spinout Member

    Joined:
    Jun 21, 2016
    Posts:
    82
    Been to busy to try yet. Hopefully I'll get around to it this week. It took some time to get Android working. One problem I found with Android is if you buy an item now, then reinstall the game and try to buy it again there is no feedback, nothing happens. I looked up the code it gives, error code 7 I believe, which meant you already bought it. So I guess a person could deal with it when that happens. Only problem is, it doesn't seem to send this info back to GM.
     
    chorrus likes this.
  22. SIG.

    SIG. Member

    Joined:
    Aug 12, 2019
    Posts:
    35
    Did the new version get rid of iap_active(product_list) without providing an equivalent---i.e., something that triggers an async response of iap_ev_purchase along with a ds_map of a purchased product?

    Looking at the "how to" article, it seems (although it does not outright say) that we should be able to see whether a durable product has been (1) previously purchased and (2) "unacknowledged" or "acknowledged," by first calling GPBilling_QueryProducts() and then, in the async event triggered in response to that function, calling GPBilling_QueryPurchase() which will immediately return a product ID. Presumably then, if we're checking on a new install to see if the user had purchased the IAP with a prior install, we could then set a flag internally to show that the purchase occurred (whether or not it was acknowledged).

    I'll have to take a slow read of the PDF that comes with the extension. I don't understand from the article the full meaning of (1) why a purchase would be unacknowledged or (2) why we can get an immediately returned value from GPBilling_QueryPurchase(). I speculate that (1) just goes to a use case that I don't know, and (2) is because GMS2 received and tucked away the Query_Purchase json data when it received Google's response to Query_Products...

    @Dan When will the current/old IAP functionality cease to work on Google's/Apple's side of things? Is there any reason that the stable version can't carry over the old functions (for at least one more version) but mark them as deprecated in the docs and IDE?
     
    Last edited: Oct 5, 2019
  23. snowgames

    snowgames Member

    Joined:
    Oct 23, 2017
    Posts:
    21
    Hi @Dan.
    When should I expect for the official release of the 2.2.4?

    Trying to figure out if I should wait for it or work on it with beta as this would be the initial release for the mobile game on iOS and android.

    Seems like there are lot of changes with IAP.
    Implementing admob ads are still the same right?

    Thanks in advance.
     
  24. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    2.2.4 is now out.

    Huge changes with implementing IAPs, but the Marketplace assets have manuals in them and we have updated setup guides for all the platforms also.

    Google Mobile Ads is the same as far as implementation goes - see the Google Play Services asset. You will find that the ads part of this is now a "top-level" extension in its own right. We have also updated the iOS SDK to a current one.
     
  25. SIG.

    SIG. Member

    Joined:
    Aug 12, 2019
    Posts:
    35
    This is awesome but my game was released today, and I'd love some assurance that I won't be forced to make these updates for X amount of time.

    YYG has forced users out of beta in the past. Will that be happening now?
     
  26. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    345
    Sorry, I'm not sure what you mean by "YYG has forced users out of beta in the past. Will that be happening now?" There is nothing in the IDE which forces you to update out of a beta version when we do a stable release (we would of course recommend it, but it's up to you when to install the update...).

    The IAPs change is something we have intended to do for a while in order to add support for subscriptions and verification, but also does have a forcing function by Google Play, as they are stopping support for an older developer library which is used within the old IAPS stuff. Please refer to your Google Play store pages for more info and the specific date (Google's original announcement is here). At the time of writing, the other stores had not announced any similar moves.

    This Google Play submission requirement change is the reason why we couldn't keep the old iap_...() functions in the runner.


    For your earlier post:

    All the extensions have an equivalent of iap_activate() - it's the ...AddProduct() function within each extension. Only, rather than building up a list of all the IAPs and activating this list once, you simply have to ..._AddProduct() each one individually by providing the product name string. For your other questions, in short, yes you would query the products to see which IAPs are available to purchase, then the purchases to see which ones have been bought and the store would return you all the purchases. I have taken to not saving within the game's own save data whether a durable or a subscription has previously been purchased, and instead I just unlock the durable/subscription for that game session according to the purchase info sent back on that run of the game.

    For further info on those changes, please continue to review the manual like you mentioned.
     
    Last edited: Oct 8, 2019
    SIG. likes this.
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice