Table of Contents

Method PurchaseProduct

Namespace
Titipi.MocaLib

PurchaseProduct(string, Action<Product>, Action<string>)

Initiates a purchase flow for the given product ID. Persists the pending product ID to PlayerPrefs so it can be recovered if the app crashes mid-transaction.

public static void PurchaseProduct(string productId, Action<Product> onSuccess, Action<string> onFailed)

Parameters

productId string
onSuccess Action<Product>
onFailed Action<string>

PurchaseProduct(string, Action<Product>, Action<string>, Action)

Initiates a purchase with an additional onStartValidate callback that fires when server-side receipt validation begins.

public static void PurchaseProduct(string productId, Action<Product> onSuccess, Action<string> onFailed, Action onStartValidate)

Parameters

productId string
onSuccess Action<Product>
onFailed Action<string>
onStartValidate Action