Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
MintPot's avatar
MintPot
Explorer
9 years ago

How does the In-App Purchases in unity3d?

How does the In-App Purchases in unity3d?
Do you have references?
i make gearvr app.and  i use unity3d .
i don't know.. In-App Purchases..
please..help me.

3 Replies

Replies have been turned off for this discussion
  • In order to fetch all the available IAP items:

    private void handleProducts(Oculus.Platform.Message<Oculus.Platform.Models.MessageWithProductList> message) {
          var productList = message.GetProductList ();
        }  

    Oculus.Platform.IAP.GetProductsBySKU(new string[]{"sku1", "sku2"}).OnComplete (handleProducts);
     
        

    In order to fetch all the IAP items that the current user has purchases:

    private void handlePurchases(Oculus.Platform.Message<Oculus.Platform.Models.MessageWithPurchaseList> message) {
          var purchaseList = message.GetPurchaseList ();
        } 
      
    Oculus.Platform.IAP.GetViewerPurchases().OnComplete (handlePurchases);