Billing.BillingService.PurchaseStateChanged C# (CSharp) Метод

PurchaseStateChanged() приватный Метод

Verifies that the data was signed with the given signature, and calls ResponseHandler#purchaseResponse(Context, PurchaseState, String, String, long) for each verified purchase.
private PurchaseStateChanged ( int startId, string signedData, string signature ) : void
startId int an identifier for the invocation instance of this service
signedData string the signed JSON string (signed, not encrypted)
signature string the signature for the data, signed with the private key
Результат void
        private void PurchaseStateChanged(int startId, string signedData, string signature)
        {
            List<Security.VerifiedPurchase> purchases;
            purchases = Security.VerifyPurchase(signedData, signature);
            if (purchases == null)
            {
                return;
            }

            List<string> notifyList = new List<string>();
            foreach (Security.VerifiedPurchase vp in purchases)
            {
                if (vp.notificationId != null)
                {
                    notifyList.Add(vp.notificationId);
                }
                ResponseHandler.PurchaseResponse(this, vp.purchaseState, vp.productId, vp.orderId, vp.purchaseTime, vp.developerPayload);
            }
            if (notifyList.Count > 0)
            {
                string[] notifyIds = notifyList.ToArray();
                ConfirmNotificationsMethod(startId, notifyIds);
            }
        }