Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Difference between marked IAP price and total price
Started by ivan888 Feb 08 2017 12:58 AM

- - - - -
16 replies to this topic
iap price difference

Best Answer Alan PlantPot , 08 February 2017 - 03:59 AM

I think they would reject it, because it's falsely advertising the item at a lower price. You should not hardcode the prices into your app, you should request the prices from the store before showing them.   

 

This is also important because you can't say the item costs "0.99$" if the user is in the UK where it would cost £0.79 or Japan where it would be ¥120.

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

Hi guys,

 

One quick question please.

 

I marked IAP items prices in my game IAP section (for example: "you get a blue player for 700 coins or 0.99$").

 

Problem is when I test IAP`s real product price is bigger (for the tax I assume).

So it is not 0.99$, it is 1.24$ for example.

 

Is that OK?

Apple won`t reject me for that?

 

 

Many thanks!  :)

Ivan



[TOPIC: post.html]
#2

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

  Best Answer

I think they would reject it, because it's falsely advertising the item at a lower price. You should not hardcode the prices into your app, you should request the prices from the store before showing them.   

 

This is also important because you can't say the item costs "0.99$" if the user is in the UK where it would cost £0.79 or Japan where it would be ¥120.



[TOPIC: post.html]
#3

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

Ok. I will just write "700 coins or buy a player".

 

In case no enough coins then I will proceed with applicable IAP process.

 

I would swore on my life that I have seen in many Android games 0.99$ signs...  :rolleyes:

I think I saw 0.99$ for a player in famous Crossy road...

 

 

Thanks Alan!
 


Edited by ivan888, 08 February 2017 - 05:13 AM.


[TOPIC: post.html]
#4

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

I think maybe you have misunderstood slightly.  

It is perfectly acceptable for your game to say "you get a blue player for 700 coins or 0.99$" but only if the price the user will pay is actually 0.99$.

 

You cannot say the price is 0.99$, if when the IAP popup appears it says 1.24$. However what you can do is find out the prices BEFORE you show your own UI that shows a price. You can do this by using the store.loadProducts() function to find out the exact price. This will give you the user's local price as well as the currency symbol. Then insert that price into your own UI.

 

Here is a very simplified version of what I mean (not tested at all but it should give you an idea):


local myIAPItemCodes = {

    "com.mygame.blueplayeriap",
    "com.mygame.redplayeriap",
    "com.mygame.greenplayeriap",
}

local function loadProductListener(event)
	for i=1, #event.products do
	    		
            local currentItem = event.products[i]
            print(currentItem.title)
            print(currentItem.description)
            print(currentItem.localizedPrice)
            print(currentItem.productIdentifier)
            print(currentItem.priceCurrencyCode)

	    if currentItem.productIdentifier == myIAPItemCodes[1] then
       		setThePriceFoPurchasingBluePlayer(currentItem.localizedPrice)
       	    elseif currentItem.productIdentifier == myIAPItemCodes[2] then
       		setThePriceFoPurchasingRedPlayer(currentItem.localizedPrice)
       	    elseif currentItem.productIdentifier == myIAPItemCodes[3] then
       	 	setThePriceFoPurchasingGreenPlayer(currentItem.localizedPrice)
    	    end
	end
end

store.loadProducts( myIAPItemCodes, loadProductListener )


[TOPIC: post.html]
#5

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

I do not want to load prices like that because internet connection can be slow or user can be offline, or store response can be slow.

 

I will just write "700 coins or buy a player".

 

I do not pay in dollars, and I think I saw 0.99$ on my Android phone...

 

 

Thanks.


Edited by ivan888, 08 February 2017 - 05:39 AM.


[TOPIC: post.html]
#6

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

On Android you might get away with it, on Apple I'm not so sure. You might get lucky if they are testing in the US and it comes up in dollars, although they would expect it to read $0.99 rather than 0.99$.  

 

Ultimately you need to connect to the store if they make the purchase anyway, so you need to handle slow/offline connections there anyway.



[TOPIC: post.html]
#7

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

I will think about it... maybe I will load store during game intro phase... in one of the persistant variables... 

Because there is no time during composer.showOverlay

 

I have only one tier, so it should not be a problem.

 

Does this call return price symbol together with the price tier?

One problems is I do not know does my custom font have all worldwide currency symbols...  :huh:



[TOPIC: post.html]
#8

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

I believe that the "localizedPrice" property contains the currency symbol and "price" does not. So you could just show the number using "price" or find out which symbols your font contains and show "localizedPrice" if it's one of those fonts.

 

I would definitely suggest loading during the intro phase rather than when the "store" screen appears if you are able to, that way it's loaded and ready to go when you need it.



[TOPIC: post.html]
#9

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

I am using iap badger, so I will see what they offer...

 

In worst case I will do "700 coins or buy a player".



[TOPIC: post.html]
#10

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

Tried to call only one product during intro phase... does not work in the testing phase.

And while buying in sandbox test mode you receive only USD anyway (not other currencies).

 

Second pitfall is how to find a font that will display all world currencies, and not some strange symbols... or you get three letter code back (I do no know).

 

Maybe player has to sign in to retrieve product(s) price...

 

I will go with "700 coins or buy a player" for now.

 

 

Thanks!


Edited by ivan888, 09 February 2017 - 01:23 AM.


[TOPIC: post.html]
#11

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

One hacky fix would be to use 2 text objects:  

 

First one says "you get a blue player for 700 coins or "

Second one shows the price. 

 

Then put the second one right next to the first one, and use your custom font on the first and a system font (or a commonly used font) for the price.

 

If you don't show a price then the number of people who actually press the purchase button will be drastically lower than if you do.



[TOPIC: post.html]
#12

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

I thought of that...

 

In testing I do not get any info from the store....

 

I will test it.... maybe I will use native.systemFont for the currency...



[TOPIC: post.html]
#13

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

Thanks Alan!
I`ve done it.

localizedPrice property returns 1.24 US$
So I am just using localizedPrice property.

I am only troubled, what font to use.
Because not all fonts hold special characters ($).... it would be much nicer if Apple would return USD instead of US$

I will use native.systemFont for second the Text object, to make sure 1.24 US$ is displayed properly.


UPDATE: native.systemFont looks very ugly... I will search for a nicer solution...

[TOPIC: post.html]
#14

Alan PlantPot

[GLOBAL: userInfoPane.html]
Alan PlantPot
  • Contributor

  • 929 posts
  • Corona SDK

It would be easier in terms of fonts if they did that, but most users would expect to see $/£/₽/etc so I think it's better they return the correct symbol.

 

This is how I would display the text objects, if it's useful for you (and for anyone who needs to do the same in future):

local textObj1 = display.newText({ 
			text = "You get a blue player for 700 coins or ", 
			x = Wherever_You_want_X, 
			y = Wherever_You_want_Y, 
			font = Your_custom_font, 
			fontSize = 20, 
			align = "center"
		})

local textObj2 = display.newText({ 
			text = item.localizedPrice, 
			x = 0, 
			y = textObj1.y, 
			font = system.nativeFont, 
			fontSize = 20, 
			align = "center"
		})

--set the x after creation, so you can use it's width in the calculation
textObj2.x = textObj1.x + (textObj1.width * 0.5) + (textObj2.width * 0.5)


[TOPIC: post.html]
#15

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

Thanks Alan!
I did that already.

1.24 US$ looks ugly with native.systemFont

I will try native.systemFontBold instead.

[TOPIC: post.html]
#16

happymongoose

[GLOBAL: userInfoPane.html]
happymongoose
  • Contributor

  • 357 posts
  • Corona SDK

Hi Ivan,

 

It doesn't help with your font, but the documentation for getting localised prices through IAP Badger is here:

 

http://happymongoosegames.co.uk/iapbadger.php?page=tutorial.markdown (see the section marked "getting product price information)

 

http://happymongoosegames.co.uk/iapbadger.php?page=getLoadProductsCatalogue.markdown

 

 

Simon



[TOPIC: post.html]
#17

ivan888

[GLOBAL: userInfoPane.html]
ivan888
  • Contributor

  • 397 posts
  • Corona SDK

Thanks Simon!
Good to know!

I love IAP bagder.

Ivan


[topic_controls]
[/topic_controls]