Virtual Purchase
-
The API could benefit from adding a new 'Virtual Purchase' platform into Products.
What the 'Virtual Purchase' platform would allow is to define a price for a product in virtual currency. This allow developers to implement virtual item purchasing using the exact same logic as any other purchase. It would make it much easier to implement things like a pack of coins that costs a number of gems or a virtual item that costs a number of coins for example.
-
Almost, but you can't define the price in virtual currency.
The solution I came up with is to make a cloud script that purchases and then immediately sells a user item. The user item has a buyPrice and a sellPrice which effectively does the currency conversion.