Google 表示如果购买是测试购买,您将收到空的 orderId。但是我们得到了正确的 orderId,所以问题是如何检查购买是否是测试购买。为什么要获取 orderId ?
最佳答案
我猜您是在检查 json 响应,而不是电子邮件中包含订单号的 Google Play 订单收据。
如果是测试购买,JSON 响应不应包含 orderId。已经确认过几次了。确保您用于测试购买的帐户包含在 Google Play 开发者控制台 > 应用设置 > 帐户详细信息中的许可测试帐户中,然后在许可测试部分。
检查 here
When your In-app Billing implementation is ready, you can test purchasing of your in-app SKUs in two ways:
Test purchases, which let your selected license-test users purchase your in-app products without any resulting charges to the user. Test purchases can be used in alpha/beta releases only.
Real purchases, which let regular users make real purchases of your in-app products with actual charges to the user’s payment instruments.
关于android - 为什么 Google 应用内结算在测试购买时会返回正确的 orderId?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35014039/