update:更新Tysdk

This commit is contained in:
2026-01-30 20:13:46 +08:00
parent b3869d3488
commit 5410f88c6c
6 changed files with 55 additions and 45 deletions

View File

@@ -182,17 +182,18 @@ public class SDKTest : MonoBehaviour
public async void OnPayTestBtn()
{
_messageTxt.text = "";
// if (sku == null){
// _messageTxt.text = "no product";
// return;
// }
if (sku == null){
_messageTxt.text = "no product";
return;
}
var sku = new SKUDetail();
sku.productId = "com.arkgame.ft.1chooseone0199";
sku.ourProductId= "comarkgameftcharge0199";
sku.title = "$1.99 choose one" ;
// var sku = new SKUDetail();
// sku.productId = "com.arkgame.ft.1chooseone0199";
// sku.ourProductId= "comarkgameftcharge0199";
// sku.title = "$1.99 choose one" ;
// // sku.price = "16900";
// // sku.price = 169;
// sku.price = "16900";
sku.ruPrice = 169;
var purchaseInfo = new JObject();
@@ -202,7 +203,7 @@ public class SDKTest : MonoBehaviour
purchaseInfo["customData"] = "{\"test\":\"test\"}";
// purchaseInfo[]
PaymentInfo payResult = await TYSdkFacade.Instance.Pay(sku, 1, sku.ruPrice, purchaseInfo);
PaymentInfo payResult = await TYSdkFacade.Instance.Pay(sku, 1, sku.ProdPrice, purchaseInfo);
_messageTxt.text = "\n" + $"Success : {payResult.isSuccess}";
_messageTxt.text += "\n" + $"message : {payResult.msg}";
}