Hi Milania, I'm letting you know that I still haven't received the bbdoc that I was requesting in my yesterday's email.
Hi Vlad Unfortunately the change in code didn't make a difference in the live version of my app. Same as before, the purchase goes through but the items and the confirmation send code are not activated, and I cannot repurchase the item as it says "I already own the item". Any other ideas? Regards Andy
It feels like Your setup is triggering something that was not I te des or setup as intended. I need more time to investigate this issue. My suspicios are: 1. You are using a setup intended. For multiple purchases but the actual purchase is for one time only 2. The actual output is never triggered past purchase Here is the documentation for an actual button and what types of purchases are available. (just info for me when I get to a pc, you can ignore it) - Ideas so far for proposals, combine that "purchase" node with an actual purchase button on ui - Came up with a way to do so in order to make sure the callback is happening and have the ability to reward the player the desired item Questions: Do you happen to have that purchase I'd setup to add something in game beside unlocking it? Do you happened to set the logger so that you can say for sure that the callback function was triggered post purchase?
Hi Vlad The UI purchase button seems a bit limited. The only action available is "Remove Adverts". If I scroll down to the bottom there are extra settings but I cannot see a place where I can assign items of anything to the purchase. See screenshot. If you have a way to combine the purchase "Node" with the purchase button UI that would be good. I was using objects because it was easier to set up and some of my purchase buttons were objects in the world settings because I wanted to create a scrolling feature which only worked with worlds. Yes I set the logger up when I previewed in Buildbox and it definitely triggered the "End" output signal. But I can't use the logger in the actual live app or can I (I don't know how to view comments in the actual app)?
Alright, first I think the store key is the actual hash generated (e.g afrwadagraaa) and not the name. Second remove that delay node since that won't do its job after the callback methods is called. Assuming that what you said about output being triggered in prevew this should work. For my proposals I need to be on a pc to test and share my ideas afterwards. And I don't have access to a pc for few days due to some medical emergency in my family.
Also to double check that Right? I cannot see it in the screen shot but I assume that's how is set up
Hi Vlad I actually don't have delays set up in my other purchase nodes. I only put that one there because I thought maybe the signal was too fast and that's why my purchases were not going through. I will remove it anyway. As for the hash codes....aren't they generated per purchase? I don't know how to get the hash code as there is no mention of them in android's developer console. Sorry to hear that about your family. I really appreciate the work you're doing on this. My game releases on the 30th March so that's why I'm pretty keen to get this working but I don't want to rush you either. I do wish Buildbox would also help. As for the code you mentioned (Settings.["power up" + B] = Settings.["power up" + B] + A), yes this is correct. "A" is a number that I set depending on the purchase button. "B" is just a code to differentiate between the power up types. I look forward to seeing if your suggestion will work. Regards Andy
Can someone please add this code and retest the purchase node? Code: const callback = function(){ component.emitSignal('End', true); } function signal(name, value){ if(value){ let storeId = this.attribute('Store Identifier'); System.purchase( storeId, callback() ); } }
Just tested this in the Buildbox Preview and its works (Logger node also says "true"). Will upload to playstore and test to see if it works there. Regards Andy
Cool, let me know if it works. Please note that this node is coded to be one time purchase but will see as we try to figure it out
Hi Vlad Unfortunately the new code didn't work. it did the opposite thing this time. The "End" output signal was activated but the playstore was not contacted so the item is rewarded even though the player did not purchase anything. Last I spoke to Buildbox they were overhauling the whole IAP setup because of issues with the android system so we may not be able to get it working anyway. But we should still try . Regards Andy
Yeah this is what I found based on my reaserch. The core structure needs to be modified in order to provide more options (like the UI button has) and / or to code stuff differently. I'll continue to investigate as soon as I can. The co clusion is simple, you will need the .bind method to make it work Until then try this please Code: const callback = function(){ component.emitSignal('End', true); } function signal(name, value){ if(value){ let storeId = this.attribute('Store Identifier'); System.purchase( storeId, callback); } }
Yes, I think you are right, I have to find another way but its hard since I didn't know when the callback is triggered. Let me find something else and I'll write some suggestions soon: UPDATE: Code: function signal(name, value){ if(value){ let storeId = this.attribute('Store Identifier'); System.purchase( storeId, () =>{ component.emitSignal('End', true); }); } } The above code should be the same as the original, the good thing is that it should work the bad thing is that I cannot test it since I don't have my setup for this. There are two outputs that can be expected here: 1) Everything works and you will get your items and what you expect 2) Payment works but the callback crashes the app therefore no items are added as a reward (and for this I will need some logs to identify where it is crashing or you can wait for an update from the bb team)
PS: Don't test the preview on windows since this will crash the client even on the latest beta builds
Hi Vlad I will test this out today. If it works I would be happy to send you a small donation for your help as you have gone out of your way to help fix this issue and you really didn't have to. So I really appreciate it and would be happy to compensate you for it I will let you know how it goes. fingers crossed! Regards Andy
Sorry. Im still waiting to test the last code you sent. its taking a while to get this last app reviewed. Hopefully will get it done in the next day or two.
Finally got approved. But unfortunately it didn't work. Same response as before. Item can be purchased but doesn't consume