It is possible to get old baggage transactions so to speak.
For example, if you are using the same test account, have created and removed more than one in-app product from the store during development, and maybe didn’t always complete the transactions you could keep seeing transactions from the past.
While it is best to just create new tester accounts, App Store Connect doesn’t reliably allow you to do so. If you can’t create new testers, send up a flare to App Store Connect they may be inclined to help you though you might want to clear your browser and possibly double check your banking info first.
While you wait, you can do the following:
In the func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) of your PaymentTransactionObserver as you loop over your transactions, first filter and finish any obsolete transactions. For example, you can check that the productIdentifier matches the current valid product that you want to process.
You may still find that obsolete transactions don’t actually go away after being finished. Oddly enough, I found it helped to implement the method:
func paymentQueue(_ queue: SKPaymentQueue, removedTransactions transactions: [SKPaymentTransaction])
I just print out the removedTransactions. They don’t always go away the first run, but may peter out in a few runs.