77 lines
1.8 KiB
C#
77 lines
1.8 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json.Linq;
|
|
using tysdk;
|
|
|
|
namespace game
|
|
{
|
|
public interface IIAPService
|
|
{
|
|
const string UnConfirmedOrder_key = "UnConfirmedOrder";
|
|
|
|
Task<IList<SKUDetail>> GetSKUs();
|
|
|
|
Task<PaymentInfo> Pay(Action<string> OnSuccessFromSdk,string replenishmentDataStr, SKUDetail sku, int count, float usdPrice, JObject extraPurcheData);
|
|
|
|
Task<Dictionary<string, string>> GetOrderUnreceived();
|
|
|
|
Task<bool> ConfirmOrders(List<string> orderIDs);
|
|
|
|
void Release();
|
|
void Init();
|
|
}
|
|
|
|
public class SC_OrderConfirmEvt
|
|
{
|
|
public bool isSuccess;
|
|
public string orderId;
|
|
public string productId;
|
|
public string errorMessage;
|
|
|
|
public override string ToString()
|
|
{
|
|
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
|
}
|
|
}
|
|
|
|
public class CS_OrderConfirmEvt
|
|
{
|
|
public string orderId;
|
|
public string sdkUserId;
|
|
|
|
public string ToJson()
|
|
{
|
|
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
|
}
|
|
}
|
|
|
|
public class CS_OrdersConfirmEvt
|
|
{
|
|
public List<string> orderIds { get; set; }
|
|
public string sdkUserId { get; set; }
|
|
|
|
public string ToJson()
|
|
{
|
|
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
|
}
|
|
}
|
|
|
|
public class CS_OrderUnreceived
|
|
{
|
|
public string sdkUserId;
|
|
public bool customData;
|
|
public string ToJson()
|
|
{
|
|
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
|
}
|
|
}
|
|
|
|
public class SC_OrderUnreceived
|
|
{
|
|
public Dictionary<string,string> orders { get; set; }
|
|
}
|
|
|
|
}
|