[M] sync with n3
This commit is contained in:
@@ -36,7 +36,9 @@ namespace tysdk
|
||||
|
||||
public class PaymentInfo : ITYSdkCallback
|
||||
{
|
||||
public bool isSuccess => code == "0";
|
||||
public bool isSuccessFromSdk => code == "0";
|
||||
public bool isSuccess => isSuccessFromSdk && confirmed;
|
||||
private bool confirmed {get; set;} = false;
|
||||
public int count;
|
||||
public string orderId;
|
||||
public string productId;
|
||||
@@ -45,6 +47,15 @@ namespace tysdk
|
||||
public string code;
|
||||
public string msg;
|
||||
|
||||
public bool Check(string orderId, string productId)
|
||||
{
|
||||
confirmed = orderId == this.orderId && productId == this.productId;
|
||||
|
||||
if(!confirmed)
|
||||
UnityEngine.Debug.LogWarning("[TYSdk Pay] order not confirmed");
|
||||
return confirmed;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
|
||||
|
||||
Reference in New Issue
Block a user