简体   繁体   English

如何在 Flutter [IAP][测试] 中测试应用内购买

[英]How to test in app purchases in Flutter [IAP][testing]

I'm using the official in_app_purchase package from Google, but I can't find any information on how to test IAP in Flutter after it's set up.我使用的是来自 Google 的官方in_app_purchase 包,但我找不到任何关于如何在设置后在 Flutter 中测试 IAP 的信息。

Android and iOS have their own guides, but they require you to add libraries and code manually which is not compatible with the way Flutter auto-generates native code. Android 和 iOS 有自己的指南,但它们需要您手动添加库和代码,这与 Flutter 自动生成原生代码的方式不兼容。

Is there a "right" way of testing in app purchases in Flutter?在 Flutter 中是否有“正确”的应用程序购买测试方法?

To test in app purchases, follow instructions from Google Code Labs要测试应用内购买,请按照Google Code Labs的说明进行操作

To be able to test in-app purchases, Google accounts of your testers must be added in the Google Play console in two locations:为了能够测试应用内购买,您的测试人员的 Google 帐户必须添加到 Google Play 控制台的两个位置:

  • To the specific test track (Internal testing)到具体测试轨道(内测)
  • As a license tester作为执照测试员

Once you configure yourself as a "license tester" you can test different scenarios using "License response" drop down (see image below).一旦您将自己配置为“许可证测试员”,您就可以使用“许可证响应”下拉菜单测试不同的场景(见下图)。

添加许可证测试人员

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM