It is not possible to implement OnAllPurchasesRetrieved callback in a third-party store properly

I am trying to integrate HuaweiStore from HMS Unity Plugin to my project.

HuaweiStore is a third-party implemetation of the IStore interface.

There is a callback IStoreCallback.OnAllPurchasesRetrieved which should be used to inform Unity Purchasing of all active purchases. This method accepts a list of Product.

The problem is Product.transactionID has internal (!!!) setter and thus cannot be modified from the Huawei Store implementation. BUT transactionID must not be null to be able to do ConfirmPendingPurchase later.

For example GoogleStore implementation has this code:

        static Product CompleteProductInfoWithPurchase(Product product, IGooglePurchase purchase)
        {
            return new Product(product.definition, product.metadata, purchase.receipt)
            {
                transactionID = purchase.purchaseToken,
            };
        }

And this cannot be reproduced in a third-party implementation because transactionID has internal setter.

I suggest Unity team to try and move store implementation to an external assembly to see if the design supports third-party implementations as declared.

Perhaps you can consider using the Unity Distribution Portal, it can let you distribute your games to multiple app stores through a single hub