update: 修复支付接口问题, 增加日志
parent
2b72cdfd70
commit
8e2b78a385
|
|
@ -324,17 +324,25 @@ namespace Guru
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 IAP 内置商品
|
||||
/// </summary>
|
||||
/// <param name="productName"></param>
|
||||
/// <returns></returns>
|
||||
public Product GetProduct(string productName)
|
||||
{
|
||||
if (_storeController != null || _storeController.products != null)
|
||||
if (_storeController != null && _storeController.products != null)
|
||||
{
|
||||
var info = GetInfo(productName);
|
||||
if (info != null)
|
||||
{
|
||||
return _storeController.products.WithID(info.Id);
|
||||
}
|
||||
Debug.LogError($"[IAP] --- can't find <ProductInfo> with name {productName}");
|
||||
}
|
||||
|
||||
// 商品不存在则返回 NULL
|
||||
Debug.LogError($"[IAP] --- _storeController is null or products is null or products.all.Length == 0");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue