private static void ReceivePurchaserInfoMethod(string arguments, PurchaserInfoFunc callback) { if (callback == null) { return; } var response = JSON.Parse(arguments); if (ResponseHasError(response)) { callback(null, new Error(response["error"])); } else { var info = new PurchaserInfo(response["purchaserInfo"]); callback(info, null); } }
private static void ReceivePurchaserInfoMethod(string arguments, PurchaserInfoFunc callback) { if (callback == null) { return; } var response = JsonUtility.FromJson <ReceivePurchaserInfoResponse>(arguments); var error = response.error.message != null ? response.error : null; var info = response.purchaserInfo.activeSubscriptions != null ? new PurchaserInfo(response.purchaserInfo) : null; if (error != null) { callback(null, error); } else { callback(info, null); } }
// ReSharper disable once UnusedMember.Global public void GetPurchaserInfo(PurchaserInfoFunc callback) { GetPurchaserInfoCallback = callback; _wrapper.GetPurchaserInfo(); }
// ReSharper disable once Unity.IncorrectMethodSignature // ReSharper disable once UnusedMember.Global public void Reset(PurchaserInfoFunc callback) { ResetCallback = callback; _wrapper.Reset(); }
public void Identify(string appUserId, PurchaserInfoFunc callback) { IdentifyCallback = callback; _wrapper.Identify(appUserId); }
// ReSharper disable once UnusedMember.Global public void CreateAlias(string newAppUserId, PurchaserInfoFunc callback) { CreateAliasCallback = callback; _wrapper.CreateAlias(newAppUserId); }
public void RestoreTransactions(PurchaserInfoFunc callback) { RestoreTransactionsCallback = callback; _wrapper.RestoreTransactions(); }