public void InitiatePurchase(Product product, string developerPayload) { if (null == product) { m_Logger.LogWarning("Unity IAP", "Trying to purchase null Product"); return; } if (!product.availableToPurchase) { m_Listener.OnPurchaseFailed(product, PurchaseFailureReason.ProductUnavailable); return; } m_Store.Purchase(product.definition, developerPayload); }
public void InitiatePurchase(Product product, string developerPayload) { if (null == product) { m_Logger.Log("Trying to purchase null Product"); return; } if (!product.availableToPurchase) { m_Listener.OnPurchaseFailed(product, PurchaseFailureReason.ProductUnavailable); return; } m_Store.Purchase(product.definition, developerPayload); m_Logger.LogFormat(LogType.Log, "purchase({0})", product.definition.id); }