android– 如何检测Google Play购买是通过测试帐户还是常规帐户进行的

android– 如何检测Google Play购买是通过测试帐户还是常规帐户进行的,第1张

概述我正在构建一个应用程序,我必须检测购买是测试购买(从测试帐户制作)还是真实用户的真实购买.请注意,该应用程序已经存在,我正在使用的SKU与生产中的相同.Google可以检测购买是否是测试,因为它显示了一条消息(“这是一个测试订单,哟不会收费”),但我正在寻找一种以编程方式检测的方

我正在构建一个应用程序,我必须检测购买是测试购买(从测试帐户制作)还是真实用户的真实购买.请注意,该应用程序已经存在,我正在使用的SKU与生产中的相同.

Google可以检测购买是否是测试,因为它显示了一条消息(“这是一个测试订单,哟不会收费”),但我正在寻找一种以编程方式检测的方法.

解决方法:

如果它不需要实时,您应该能够通过以编程方式使用gsutil下拉销售报告来解决日期,然后解析CSV以获取标题带有前缀的任何订单“测试:“.

https://support.google.com/googleplay/android-developer/answer/6135870?p=financial_export&rd=1#export

Download reports from Google Cloud Storage

Monthly reports are available from Google Cloud Storage. Reports
are generated daily and accumulated in monthly CSV files. They are
stored in a private Google Cloud Storage bucket for your Google Play
Developer account.

You can access reports using Google Cloud Storage on your browser or
programmatically using gsutil. You can also use other tools to
programmatically access your Cloud Storage bucket.

Tip: If you want to import your reports from
Google Cloud Storage into Bigquery, you need to convert the CSV files from
UTF-16 to UTF-8.

Your Google Cloud Storage bucket ID is Listed near the bottom of
your Reports pages.

Your bucket ID begins with pubsite_prod_rev (example:
pubsite_prod_rev_01234567890987654321).

总结

以上是内存溢出为你收集整理的android – 如何检测Google Play购买是通过测试帐户还是常规帐户进行的全部内容,希望文章能够帮你解决android – 如何检测Google Play购买是通过测试帐户还是常规帐户进行的所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1118231.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存