2025-09-18 10:30:57 +00:00
|
|
|
#if UNITY_PURCHASE
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
namespace WZ
|
|
|
|
{
|
|
|
|
public struct PurchaseInfo
|
|
|
|
{
|
|
|
|
public string productName;
|
|
|
|
public string productID;
|
|
|
|
public string orderID;
|
|
|
|
public string currency;
|
|
|
|
public string price;
|
|
|
|
public string gameExtra;
|
|
|
|
public string productType;
|
|
|
|
public string failReason;
|
|
|
|
public bool orderAlreadyExists;
|
|
|
|
public bool purchaseResult;
|
|
|
|
public IAPResultType resultType;
|
|
|
|
public PurchaseInfo(string productName, string productID, string orderID,
|
|
|
|
string currency, string price, string gameExtra,
|
|
|
|
string productType, string failReason, bool orderAlreadyExists, bool purchaseResult,
|
|
|
|
IAPResultType resultType)
|
|
|
|
{
|
|
|
|
this.productName = productName;
|
|
|
|
this.productID = productID;
|
|
|
|
this.orderID = orderID;
|
|
|
|
this.currency = currency;
|
|
|
|
this.price = price;
|
|
|
|
this.gameExtra = gameExtra;
|
|
|
|
this.productType = productType;
|
|
|
|
this.failReason = failReason;
|
|
|
|
this.orderAlreadyExists = orderAlreadyExists;
|
|
|
|
this.purchaseResult = purchaseResult;
|
|
|
|
this.resultType = resultType;
|
|
|
|
}
|
2025-09-19 03:34:25 +00:00
|
|
|
|
|
|
|
public string ToJson()
|
|
|
|
{
|
|
|
|
return JsonUtility.ToJson(this);
|
|
|
|
}
|
2025-09-18 10:30:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|