예제 #1
0
        /// <summary>
        /// reads receipt data for a specific product id.
        /// Optional decryption
        /// </summary>
        public static string GetReceipt(string id)
        {
            string key = instance.idPrefix + id;

            if (instance.encrypt)
            {
                key = instance.Encrypt(key);
            }
            //read existing data string
            string data = PlayerPrefs.GetString(key, "");

            //read data into memory
            //if encryption is enabled, decrypt before reading
            if (instance.encrypt)
            {
                data = instance.Decrypt(data);
            }
            return(data);
        }