How to Cancel the Pending operation?

  public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
    {
        for (int i = 0; i < purchaseableInfos.Count; i++)
        {
            if (String.Equals(e.purchasedProduct.definition.id, purchaseableInfos[i].purchaseID, StringComparison.Ordinal))
            {
                if (purchaseableInfos[i].productType == ProductType.Consumable || purchaseableInfos[i].productType == ProductType.NonConsumable)
                {
                    Product product = storeController.products.WithStoreSpecificID(purchaseableInfos[i].purchaseID);
                    PurchaseableProduct purchaseableProduct = purchaseableInfos.Where(x => x.purchaseID == purchaseableInfos[i].purchaseID).FirstOrDefault().purchaseableProductType;
                    InAppPurchaseController.Instance.GiveProduct(purchaseableProduct);

                    StartCoroutine(SaveCloudCoroutine(product));

                    return PurchaseProcessingResult.Pending;
                }

                OnPurchaseCompleted?.Invoke();
            }
        }

        return PurchaseProcessingResult.Complete;
    }

    IEnumerator SaveCloudCoroutine(Product product)
    {
        //We will save the product information to the cloud and we start to wait done saving.
        //doTheThing.text = "Pending Waiting";
        yield return new WaitForSeconds(1f);
        ////When it's successfully saved on the cloud we're going to confirm the pending purchase.
        //doTheThing.text = "Pending Complete";
        storeController.ConfirmPendingPurchase(product);
    }

I’m confirming my Pending operation here but if cloud is not able to save this data, I want to cancel the pending. How can i cancel my pending product?

The pending product cannot be canceled unless you return PurchaseProcessingResult.Complete. You can try to save it again after the save fails, or process it after the next IAP initialization.