In-app purchase is unlocking two characters and not just the one.
Jayden.goodall
Member, PRO Posts: 15
Hey everyone,
So I currently have two characters that are purchasable through the IN-APP purchase system.
Both characters have the same transcript.
So that is my table setup above.
Below is the button (Buy) they press when they wish to purchase the selected animal (in this case the ladybug).
The set out for the other animal is the exact same, except for the in-app purchase - buy item.
The table ID is set for the row below.
The Product id between Apple and Gamesalad is correct.
When the purchase is put through for one, both of the animals unlock which is what I'm trying to avoid.
This is all done on a MAC.
Any help would be much appreciated!
Comments
Bump.
Can you screenshot the whole logic of 'Buy Ladybug?' There is a closed rule and we don't see the whole content in the expression editor of the Buy Item behaviour. That way, it's pretty impossible to give you any advice.
@Jayden.goodall
the first odd thing I see here is that for product ID you use "table cell value"
you only have to post your ID there no reference to the table value so just
207845219
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
It's a bit atypical to do it like this, but there is nothing wrong with it per se, if you reference the right table cell, it will give you the correct name. The benefit is of course that if you decide to change the product ID -- from a string of numbers to some clearer name -- it won't mess up your in-app purchase rules.
But yeah, that's why I need to see the whole expression, to make sure no nonsense is happening in there.
Since writing this post, I have changed the "table cell value" thing in the product ID to an actual ID and have changed it through iTunes connect.
As for my buy button, this is exactly how it is currently set.
As for my table values, these are currently how they are set.
Im not to sure why but if a purchase is made,
IE. the lady bug button is pressed to purchase, it will generally unlock both the lady bug and the turtle.
However, if you purchase the turtle first then click the lady bug it will automatically unlock the lady bug.
My guess is that both the status's are becoming purchased rather than only one.
These are also my ID numbers... I though maybe it was a glitch and changed them however, the issue remains.
@pHghost Any chance of having a look at the above?
Two questions:
Why is the in-app rule turned off?
Secondly: can you click open the expression editor for the text expression to check 'purchased?'
Also, I personally never use the Callback as a rule requirement. Not sure if that could be an issue.
So I turned it off so no one would be prompt in my testing (cause that version was an external test).
That would be in expression text (above).
I might give it a go without a callback and try that.
And the logic for the Turtle Skin is exactly the same, just referencing different table cells?
Yeh so the turtle one is the same, its just got the different cell number (which would refer to the turtle and not the lady bug).
So in the turtle one, it says 2,5 rather than 1,5.
As shown below.
Yes, and the game.Saving table row is different as well.
Are you testing the purchases on ad-hoc, testflight, or where are you seeing the results (of two being unlocked)?
Also, I assume the two buttons on the shop scene are in separate locations, not overlapping.
So I have two buttons in my actors. one for turtle and one for lady bug. The lady bug button is spawned when the lady bug selected, and the turtle button is spawned when the turtle button is selected.
Its the exact same spawn settings though (apart from the different display picture and button).
When im testing the game, I upload it to Itunes connect and test the game through testflight.
The game.saving table is so that it loads to an attribute and then through to purchase.
Although i could change it so that when the item is in state "purchase" to unlock.
If you are testing in TestFlight, make a display console: just a TextDisplay which will show you the state of all the actors, attributes and table values related to the purchase. Watch what they do as you make a purchase. I'm not seeing any problems from the outside like this.
Can you possibly upload the problematic part to be looked at? Copy the project, remove the rest of the game, leave just the purchase buttons, actors and logic spawning the buttons and the related tables. If you upload it, I'll have a look.
Keep in mind that if you are testing through TestFlight that calling the purchase table will likely automatically restore all Non-Consumables (if they were previously purchased on the itunes account you're logged into) depending on how your purchase rules are set up.
In other words, anytime you make a purchase, the entire PurchaseTable gets filled out with "purchased", "unpurchased" etc. for each row in column 5, so any Non-Consumables you purchased in the past end up getting restored even if you weren't intentionally trying to buy it.
So if you bought character #1 in the past with your account, buying character #2 (or making any purchase for that matter) will automatically unlock character #1.
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
Oh! So when testing in testflight, it does an automatic restore when a re-purchase is done?
This might explain as to why its like this then.
Cause it did the test with the attributes on screen and when i purchase the lady bug, it automatically opens up the turtle (however, I have purchased both before).
Finally got it! Thank you both so much! I appreciate all your help!
yeah, i would maybe try testing a different itunes account that you haven't used before with your game, and if buying one character doesn't unlock the other, you should be good to go.
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
Yeh I made a new one and tested it and it worked fine!
Cool! Great insight, @supafly129!
@pHghost @Jayden.goodall glad i could help!
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download