Restore purchase with InAppBillingPlugin
I am currently using the InAppBillingPlugin from James Montemagno to deploy a subscription program in my app.
It works fine but I need to make a restore purchase feature in the app and I encountered a problem with this.
I have followed the process explained on the documentation but when I call the function GetPurchaseAsync(), there's nothing in the Enumerable object I get.
I tried with my real apple store account, I bought a product with the actual app in production and tried to restore my purchase with my app in development.
If anyone knows how I can correct this, it would be very helpful!作者: nicar 的来源 发布者： 2017 年 12 月 27 日
Don't use your real apple account to test the production app in the development environment. It won't work.
If you want to test your In-App Purchase with development environment. Please change your apple account to Test User Accounts and use sandbox environment. About how to create your app's own test account you can refer to: Create a sandbox tester account.
Note that the text “[Environment: Sandbox]” appears as part of the prompt, indicating that you’re connected to the test environment. More details about how to Retrieving Product Information please see here.