IAP Android: detect on launch if pending purchase was unacknowledged cancelled outside of app

In my Android app, I made a purchase using the testing framework, specifically Android’s “approved purchase after a few minutes”. I quit the app immediately afterwards and waited for the email telling me that the purchase was cancelled. Then when I returned to the app, my app didn’t know that the transaction was cancelled. How can the app determine that the transaction was cancelled? Perhaps if it does not show up in the list of receipts?

https://docs.unity3d.com/Packages/com.unity.purchasing@4.12/api/UnityEngine.Purchasing.Product.html?q=acknowledge

hasReceipt

Owned Non Consumables and Subscriptions should always have receipts. Consumable’s receipts are not persisted between App restarts unless it has a pending transaction. Once a consumable has been acknowledged (ConfirmPendingPurchase) the receipt is removed.

Is this the only way or is there a more preferred method?