Its a bit buried in the docs but here is the code You only need to pass in a purchase Id or a list of items if you are using them to trade
#How to Implement Virtual Purchases in Unity Cloud Code with EconomyService
1 messages · Page 1 of 1 (latest)
Is there server side docs for purchases?
There are API docs which should be what Cloud Code is using. But there is not much in the way of examples.
There is a Virtual Shop example but I don't think it uses Cloud Code
Yea, it uses client side only I had downloaded that yesterday. Well, nevermind, ill stick with Azure while they give us more info how to use it. And Thanks for your time 🙂
Does the code here not work? Apologies if I'm not following here, but generally speaking what you have looks fine.
They give you an object to return that contains the costs and rewards of the purchase.
In terms of exceptions, you either get a valid response from Cloud Code or you don't. So you basically just try-catch the virtual purchase and show success or failure to your player.