How do I show IAP product price?

Get help using Construct 2

Post » Fri Aug 05, 2016 2:22 pm

I'm trying to show the IAP product price, but it just shows "text" when I try it.
I have a textbox and the code is:
CordovaIAP -On request listing succeeded --- textbox - set text to "CordovaIAP.ProductPrice("productID")

(but I have of course the real product ID in my code)
B
10
S
3
Posts: 62
Reputation: 774

Post » Fri Aug 05, 2016 5:20 pm

Is your text box showing "text" by default? That probably means your 'On store listing' wasn't successful. You first need to 'Request store listing' then you can use the action 'On store listing success'. If there is still a problem then we need to take a closer look at the store logic.
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Fri Aug 05, 2016 6:21 pm

I have "request store listing" on start of layout, but do I need to do it again before I want it to change the text?
It should be succestful because I'm using "has product" events and they are working. But I'm very new to working with IAP so I might not get it yet!
Last edited by annauva on Fri Aug 05, 2016 8:25 pm, edited 1 time in total.
B
10
S
3
Posts: 62
Reputation: 774

Post » Fri Aug 05, 2016 7:01 pm

Nope I think on start of layout is good enough. Maybe you have a typo somewhere? I always start with some debug, try setting it to On store listing failed and see if the text changes? Can the product names be displayed?
B
47
S
18
G
84
Posts: 2,266
Reputation: 49,786

Post » Sat Aug 06, 2016 10:03 am

Thanks for helping me! I tried on listing failed and it didn't work. Product name also doesn't work. I'm sure I've just messed up somewhere. I will show the code and maybe you can see an error somewhere? (it's kind of ugly now because I'm just testing everything)
Image
B
10
S
3
Posts: 62
Reputation: 774

Post » Sun Aug 07, 2016 10:33 am

Could someone see if this looks right or not just so I know where to look for errors? I hope this is wrong so that I can fix it because otherwise I have no idea what could be wrong.. :/
B
10
S
3
Posts: 62
Reputation: 774

Post » Wed Nov 16, 2016 2:20 pm

I have similar difficulties with IAP Contruct2 plugin. I can't get price. Did you solve the problem?
B
13
S
6
G
1
Posts: 13
Reputation: 1,602

Post » Mon Jan 09, 2017 8:46 pm

Oh sorry, I didn't get an email saying someone replied on this thread! I actually don't remember how I got it to work ,but I did somehow.. Sorry! :(
B
10
S
3
Posts: 62
Reputation: 774


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests