question

Karl Loveridge avatar image
Karl Loveridge asked

Why is StoreItem reporting real money under virtual currency?

I am writing the code that presents the UI for doing in-app purchasing. When I iterate through the items in GetStoreItemsResult, I found the item I was setting up with this code:

        void OnCurrencyStoreDataValid(GetStoreItemsResult _result)

        {

            m_buyValid.SetActive (true);



            foreach (StoreItem s in _result.Store) {

                if (s.ItemId == Constants.cBuySmallGB) {

                    //uint c = s.RealCurrencyPrices ["rm"];

                    //m_smallPurchaseCost = s.RealCurrencyPrices

                } else if (s.ItemId == Constants.cBuyLargeGB) {



                } else if (s.ItemId == Constants.cBuyRemoveFee) {



                }

            }



            m_doneTxt.text = "Done";

        }

I wasn't expecting the real money value to appear under virtual currency. Why is it that way? The "RealCurrencyPrices" was null.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

That's a legacy artifact of our original implementation which will be updated in a future release (although, since we're committed to no breaking changes, the existing system will continue to be available even then). In short, when the catalog was first set up, the VirtualCurrencyPrices included all prices - both VC and RM ("real money"). The RealCurrencyPrices parameter was added later, as a way to specify exact prices in non-US currencies.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.