暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

INativeStore.cs 1.7KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. namespace UnityEngine.Purchasing
  3. {
  4. /// <summary>
  5. /// An interface to native underlying store systems. Provides a base for opaquely typed
  6. /// communication across a language-bridge upon which additional functionality can be composed.
  7. /// Is used by most public IStore implementations which themselves are owned by the purchasing
  8. /// core.
  9. /// </summary>
  10. public interface INativeStore
  11. {
  12. /// <summary>
  13. /// Call the Store to retrieve the store products. The `IStoreCallback` will be call with the retrieved products.
  14. /// </summary>
  15. /// <param name="json">The catalog of products to retrieve the store information from in JSON format.</param>
  16. void RetrieveProducts(String json);
  17. /// <summary>
  18. /// Call the Store to purchase a product. The `IStoreCallback` will be call when the purchase is successful.
  19. /// </summary>
  20. /// <param name="productJSON">The product to buy in JSON format.</param>
  21. /// <param name="developerPayload">A string used by some stores to fight fraudulent transactions.</param>
  22. void Purchase(string productJSON, string developerPayload);
  23. /// <summary>
  24. /// Call the Store to consume a product.
  25. /// </summary>
  26. /// <param name="productJSON">Product to consume in JSON format.</param>
  27. /// <param name="transactionID">The transaction id of the receipt to close.</param>
  28. void FinishTransaction(string productJSON, string transactionID);
  29. }
  30. delegate void UnityPurchasingCallback(string subject, string payload, string receipt, string transactionId,
  31. string originalTransactionId, bool isRestored);
  32. }