update:支付调整

This commit is contained in:
2026-01-29 10:22:25 +08:00
parent 333d8fa6f7
commit 9f1379c465
6 changed files with 56 additions and 7 deletions

View File

@@ -52,10 +52,16 @@ namespace tysdk
};
return result;
#elif UNITY_ANDROID
var pType = "googleiab.global.app";
// var pType = "googleiab.global.app";
var pType = tysdk.AccountInfo.googlePayType;
if (_accountInfo.channel == EAccoutType.hwVkid)
pType = tysdk.AccountInfo.hwPayType;
var task = TYSDKCallbackManager.Instance.RegisterCallback<PaymentInfo>(TimeSpan.FromMinutes(1));
@@ -130,7 +136,7 @@ namespace tysdk
//商品列表的回调
public void SKUListResult(string json)
{
Debug.Log("[TYSdkFacade] GetSKUList callback");
Debug.Log($"[TYSdkFacade] GetSKUList callback -> accountChannel: {_accountInfo.channel}");
var jresult = JObject.Parse(json);
int code = int.Parse(jresult["code"].ToString());
var result = new ProductListInfo();
@@ -139,8 +145,19 @@ namespace tysdk
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;
// var jsonObjList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SKUDetail>>(productStr);
// result.products = jsonObjList;
var accountChannel = _accountInfo.channel;
if (accountChannel == EAccoutType.hwVkid)
{
result.ReadSkuFromData(productStr, accountChannel);
}
else
{
// var jsonObjList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SKUDetail>>(productStr);
// result.products = jsonObjList;
result.BaseReadSkuFromData(productStr);
}
#elif UNITY_IOS && !UNITY_EDITOR
result.ReadSKUFromJson(productStr);
#endif