Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / In-app purchase - Get Price?

Author
Message
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 4th Sep 2014 11:53 Edited at: 4th Sep 2014 11:54
Hi, using 108.21 there does not seem to be a way to get the price of a particular in-app purchase item.

Any help with the following questions would be appreciated

Am I missing something?
Has it been added in v2?
Can I hack it in since I'm using tier 2?

I recently missed out on a promotion because I could not set the price of my in-app purchases dynamically inside the app. I made the iap free from iTunes connect so the iap was free but my app could not express this change in price so they had to leave me out of the promotion.

I could grab the price from my own server but again this is hacky, from googling it seems you should be able to get the price from Apple's(and google's) servers.

Thanks

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 4th Sep 2014 19:11 Edited at: 4th Sep 2014 19:15
I've only worked with AppGameKit IAP stuff via Tier 1, but know that it never had any such feature to retrieve pricing information from Apple servers--I've not yet seen any changes to these commands in V2 either that would add such functionality.

Being able to retrieve localized product information is an essential component of IAP when building for Apple/Google, so it is a shame this does not readily exist in AppGameKit as it leaves the IAP features incomplete. In fact, Apple specifically states that you should be querying the server for localized info about each available product before displaying to the user.

In Tier 2 you should be able to add this functionality easy enough (using SKProductsRequest for Apple) similar to adding any new libraries and components. Refer to the Retrieving Product Information section of this link. However that may mean breaking out of the AGK-based IAP commands altogether and simply passing the necessary data to and from your AppGameKit functionality. xGekkox would be the one to talk to as he's got IAP for all his apps using Tier 2.
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th Sep 2014 19:37
Even though they say to do this many apps don't. I almost wonder if this is a redundancy left over from early IAP integration. It's a bit silly in my opinion as you're told the price as soon as you tap the item via the iOS IAP dialogue (same with Android). Although, I do agree this feature would be very nice.
Paul is adding receipt identifiers to the IAPs, I'll put in a request for him to add this too.

If you're set on doing this now there are ways to set up a PHP script which can get the current conversion rate. It would, however, be pretty messy (http://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance) and there's no guaranty that it would match up to Apple's conversion rate. Google, I assume you'd be pretty likely to hit if you use Google Finance API.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 5th Sep 2014 11:53
@xCept - Thanks, I may have to integrate it myself but I am reluctant to do that right now. I will wait to see if it gets added officially before I release my next game.

@Naphier - Thanks also, hopefully this will not be too difficult for Paul to add. It seems you are recommending not having a price on the iap and wait until the user clicks to find out the price, that could be an option but it's not very user friendly.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Sep 2014 20:42 Edited at: 5th Sep 2014 20:43
Of course you can do it.
You need to use OBJ C.
It also do the automatic conversion for local currency.

Login to post a reply

Server time is: 2024-11-25 09:50:31
Your offset time is: 2024-11-25 09:50:31