UNSOLVED Virtual currency not updating in the cart
-
Hi,
I can purchase an item on the app store (using testFlight). The problem I have is that the virtual currency (or in the demo called COINS) does not update on the shopping cart once the transaction is completed successfully. The value on playfab is updated properly. I am thinking to just assign the value in playfab to the Virtual Currency Text on the shopping cart but not sure which script I need to update (i.e. script that updates and displays the virtual currency on the shopping cart).
Thanks in advance!
-
Hi,
by "shopping cart" in the sample scenes, do you mean the amount of virtual currency displayed at the top of the screen? There is no actual shopping cart or cart display in the demo, that's why the terminology got me confused.
The virtual currency display is a UI Label component with the script "UpdateFunds" on it. In that script inspector, the name of the virtual currency is defined, from where it should display the amount. If you change the virtual currency name or add a new one, you also have to change the currency name on that script.
-
@baron I am still having a problem with the currency display to update in the UI label. I noticed the following:
When the virtual currency display scene (sample demo) loads, UpdateFunds is called/triggered. However when a purchase is made the UpdateFunds is never triggered, even when I use DBManager.increaseFunds in the IAPListener script. Based on the code i've read, the UpdateFunds is subscripted to IAPManager and DBManager callback. The only way I can make it work is to reload the scene in the IAPListener script (the currency updates fine). Something is not right, I didn't have this problem with the Steam version of the game. I am not sure where else to look...
-
However when a purchase is made the UpdateFunds is never triggered, even when I use DBManager.increaseFunds in the IAPListener script.
Both methods invoke the DBManager.Save method, which fires the updatedDataEvent. Are you able to reproduce this in a separate project, after importing Simple IAP System? I'm pokering around in the dark on this as well.