How do I Make In-app purchases correctly?

Get help using Construct 2

Post » Sun May 17, 2015 7:29 pm

So how should i set up the code?

ON sprite(btn) touched: FETCH PRODUCT X
IS IN COCOONJS
IS STORE AVAILABLE : Purchase X


where do i put the ON product fetch complete? (it cant go under On sprite touched, it has to be separate somehow)

@littlestain if you've never worked with fetching products do you knwo someone who has so he could help out?
B
5
Posts: 48
Reputation: 319

Post » Sun May 17, 2015 7:44 pm

ON sprite(btn) touched: FETCH PRODUCT X

ON product fetch complete
--IS IN COCOONJS
-----IS STORE AVAILABLE : Purchase X
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun May 17, 2015 8:11 pm

Thanks for the code @littleStain but what im wondering is how do i know which product has been fetched

for example
ON sprite(btn1) touched: FETCH PRODUCT 1
ON sprite(btn2) touched: FETCH PRODUCT 2

ON product fetch complete
--IS IN COCOONJS
-----IS STORE AVAILABLE : Purchase PRODUCT 1

How do i purchase the product based on the fetched product of the button? Since the "on product fetch complete" cant go under BTN touch

In this example:

How do i know if i've fetched the product from BTN 1 or BTN 2? (without declaring variables for each button and setting them to true and then doing an IF true then kind of thing, because it would take a lot of space and time for all of the products i've got)
B
5
Posts: 48
Reputation: 319

Post » Mon May 18, 2015 12:49 pm

bump!


Really need to solve this guys so i can update the final version of the game!
B
5
Posts: 48
Reputation: 319

Previous

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, maranpis, missile, oosyrag, Yahoo [Bot] and 31 guests