如何查看交易是用测试账户购买还是用真实账户购买? [英] How to check if transaction is made with test account purchase or with real account purchase?

查看:46
本文介绍了如何查看交易是用测试账户购买还是用真实账户购买?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用测试帐户进行应用内购买测试,但 google 的响应与从真实帐户进行的购买相同.如何根据google的回复判断购买是否为test?

I am making an In-app purchase test with test account but the response from google is same as the purchase made from real account. How to check if the purchase is test based on the response from google?

推荐答案

是的,您可以从 Google 的 Purchases.subscriptions API 响应的 purchaseType 字段中查看参考.

Yes, you can check that from the purchaseType field of the Google's Purchases.subscriptions API response refer.

字段:购买类型

类型:整数

说明:订阅的购买类型.仅当此购买不是使用标准的应用内计费流程.可能的值是:0 = 测试(即从许可证测试帐户购买)

Description: The type of purchase of the subscription. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0 = Test (i.e. purchased from a license testing account)

正如 Google 建议的那样,您必须开发一个 Web 服务器,您可以从中获取完整的字段列表.如果您想了解有关 Web 服务器的更多信息,请参阅我的 this 答案.

As Google suggests, You have to develop a web server from where you can get a comprehensive list of fields. If you want to know more about the web server follow then refer to my this answer.

这篇关于如何查看交易是用测试账户购买还是用真实账户购买?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆