GetPurchaseDate

Description

Returns the Product’s purchase date.

For Apple, the purchase date is the date when the subscription was either purchased or renewed. For Google, the purchase date is the date when the subscription was originally purchased.

Declaration

public static DateTime GetPurchaseDate(ShopProductNames product)

Parameters

NameDescription

product

An enum member is generated from the Settings Window.

Requires using Gley.EasyIAP;

Return

DateTime - Date of the purchase.

Example

Test.cs
using Gley.EasyIAP;
using UnityEngine.UI;

public class Test : MonoBehaviour
{
    [SerializeField] public Text date;
    public void GetValue()
    {
        date.text = Gley.EasyIAP.API.GetPurchaseDate(ShopProductNames.YourSubscription).ToLocalTime().ToString();
    }
}

Last updated