update:当前支付成功
This commit is contained in:
@@ -110,8 +110,8 @@ namespace tysdk
|
||||
Debug.Log("[TYSdkFacade] pay callback:" + json);
|
||||
var jresult = JObject.Parse(json);
|
||||
var result = new PaymentInfo();
|
||||
result.code = jresult["code"].ToString();
|
||||
result.msg = jresult["errStr"].ToString();
|
||||
result.code = jresult["code"]?.ToString();
|
||||
result.msg = jresult["errStr"]?.ToString();
|
||||
TYSDKCallbackManager.Instance.TryTriggerCallback(result);
|
||||
}
|
||||
|
||||
@@ -145,19 +145,21 @@ 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 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);
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user