The IAP for GooglePlay doesn't work?

RoyimRoyim Member, PRO Posts: 43

Hey guys, I set the in app purchase as the pics show, but there's still no response when I try the button in the game. It didn't got any message or linking to google store. Is there any mistake I made? Could anyone please teach me>.<?

I have use the phone to test the apk, but it seems no respone from store and the app keeps set to purchased. I never pay, but getting the item all the time.

the IAP was worked one time, which can connect the google, i can use my test account to buy the item, afterwards, i have receive the google email about this test. but, i don't know why it just work for one time..

Comments

  • IceboxIcebox Member Posts: 1,485
    edited July 2017

    It's confusing are you trying to make it consumable or non consumable ?

    If its non- consumable ( You only buy it once , for example , remove ad)

    step 1

    In app purchase - Request purchase data
    1 , -1 , self.callback

    step 2

    If touch is pressed
    buy item - product id xxx

    step 3

    if text expression tablecellvalue(1,1(whatever row),5) is purchased ( do not open the expression editor , just type it in directly)
    do
    change the attribute you want to change ( i.e change attribute remove ads to true)
    after 0.03 seconds ( to make sure everything changed then we will execute the code below (optional) )
    save attribute ( or save table if your using table)

    thats it

  • IceboxIcebox Member Posts: 1,485
    edited July 2017

    If its a consumable item , (you can buy it more than once ( example buy 100 coins))

    step 1 ( This behavior needs to be called once in a scene , if you had this behavior on another actor then skip this step)

    In app purchase - Request purchase data
    1,-1,self.callback

    step 2

    if touch is pressed
    buy item - product id xxx

    step3

    if text epression tablecellvalue(1,1(whatever row),5) is purchased
    change attribute coins to coins + 100 ( or change table value if your doing it with tables)
    after 0.03 ( to make sure everything changed then we will execute the code below (optional))
    In app purchase - Consume item ID: xxx ( this is the only thing we are adding ,this will alow the player to purchase again once the purchase is complete)
    save attribute ( or save table if your using table)

    thats it hope it makes sense

  • RoyimRoyim Member, PRO Posts: 43

    !!! THX A LOT, I WILL TRY IT LATER^^

Sign In or Register to comment.