I am trying to set up IAP in oculus but I get null reference on this call IAP.LaunchCheckoutFlow(sku).OnComplete(OnProcessingPurchasedProductCallback);
I have set up test user with always succeeds credit card settings. reference here (https://developer3.oculus.com/doc/1.0.0-platform/_o_v_r___requests___i_a_p_8h.html)
This is the debug log i get:
And here is my code:
public static void InitiatePurchase(string sku) { Debug.Log ("SKU IS " + sku); // For testing within the Unity Editor, I highly recommend you short-circuit your IAP callback flow in some way that your user is simply granted access to the purchase if (Debug.isDebugBuild) { Debug.Log ("CoinPackage one was prourchased inside unity"); Coin_package_one_purchased(); } else { Debug.Log ("CoinPackage one is being purchase inside oculus"); IAP.LaunchCheckoutFlow(sku).OnComplete(OnProcessingPurchasedProductCallback); Debug.Log ("check out flow has been launched"); } }
Are you sure that your Oculus.Platform.Core.Initialize() function call was successful? The only reason I know of for that to return null is if the platform was not initialized before making the call.