Google表示如果购买是测试购买,您将收到空订单ID.但是我们得到了正确的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.