lundi 8 juin 2020

restoreCompletedTransactions() restored purchase by prior sandbox user

I created a few sandbox users for testing IAP in my app. I used the first sandbox user to test purchasing product and it worked fine. Then I switched to the second sandbox user to test restoring purchase. I expected it "failed" to restore the purchase (I mean the func call succeeded but it restored no transactions). But it turned out that it successfully restored the product I purchased using the first sandbox user. I tried a few other test users and always the same behavior. Is this correct? Any idea why it was so and how could I test restoreCompletedTransactions() in a clean environment? Thanks in advance!

UPDATE: More experiments showed that the restoring purchase call succeeded even if I disconnected the network. As a comparison the purchasing product call returned network error in this situation. No idea why :(

Aucun commentaire:

Enregistrer un commentaire