• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

OFFICIAL GMS2 IAPs Updates 2.2.4 Feedback

Status
Not open for further replies.

rmanthorp

GameMaker Staff
Admin
GameMaker Dev.
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:

Dan

GameMaker Staff
GameMaker Dev.
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...
 

FrostyCat

Redemption Seeker
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:

Nocturne

Friendly Tyrant
Forum Staff
Admin
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 people like Destron lead them astray again, this time with real money and payment details in the mix? Can't the web dev team help out?
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).
 

Dan

GameMaker Staff
GameMaker Dev.
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?
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.
 

Dan

GameMaker Staff
GameMaker Dev.
A download link for all the IAP extensions has now been added to the first post in this thread ("HERE").
 

rIKmAN

Member
@Dan are there going to be any updates to the Facebook Instant Games extension, specifically regarding IAP / monetisation support?
 

Mert

Member
@Dan are there going to be any updates to the Facebook Instant Games extension, specifically regarding IAP / monetisation support?
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

Member
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.
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

Member
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! :)
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.
 

rIKmAN

Member
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.
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! :)
 

Dan

GameMaker Staff
GameMaker Dev.
@Dan are there going to be any updates to the Facebook Instant Games extension, specifically regarding IAP / monetisation support?
Right now, we are only updating these platforms. We'll announce if/when more platforms are getting IAP support.

Awesome work on the extension!
 

spinout

Member
I'm currently working on implementing them into one of my apps. I'll update with the results soon! Test purchases are working!
 

Dan

GameMaker Staff
GameMaker Dev.

chorrus

Member
Anyone tried the new IAPs extensions yet? Any issues?
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?
 

chorrus

Member
I'm currently working on implementing them into one of my apps. I'll update with the results soon! Test purchases are working!
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?
 

spinout

Member
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.
 

SIG.

Member
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.
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:

snowgames

Member
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.
 

Dan

GameMaker Staff
GameMaker Dev.
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.
 

SIG.

Member
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.
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?
 

Dan

GameMaker Staff
GameMaker Dev.
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:
Status
Not open for further replies.
Top