[M] login & logout & payment
- login by token - save account info - logout remove accout info - iOS SKU list parser - iOS Pay
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
@@ -117,16 +118,20 @@ namespace tysdk
|
||||
//商品列表的回调
|
||||
public void SKUListResult(string json)
|
||||
{
|
||||
Debug.Log("[TYSdkFacade] GetSKUList callback:");
|
||||
var result = new ProductListInfo();
|
||||
Debug.Log("[TYSdkFacade] GetSKUList callback");
|
||||
var jresult = JObject.Parse(json);
|
||||
int code = int.Parse(jresult["code"].ToString());
|
||||
var result = new ProductListInfo();
|
||||
if (code == 0)
|
||||
{
|
||||
string productStr = jresult["respObj"].ToString();
|
||||
result.code = code;
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
var jsonObjList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SKUDetail>>(productStr);
|
||||
result.products = jsonObjList;
|
||||
#elif UNITY_IOS && !UNITY_EDITOR
|
||||
result.ReadSKUFromJson(productStr);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (callbacks.TryGetValue("SKUListResult", out var action))
|
||||
|
||||
Reference in New Issue
Block a user