android - 为什么 Google 应用内结算在测试购买时会返回正确的 orderId?

标签 android in-app-purchase in-app-billing

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/

相关文章:

android - 异步任务 Android 中的 java.util.concurrent.RejectedExecutionException

ios - 通过模拟器进行应用内商店购买

android - 在多个设备上测试应用内购买

iphone - 如何在没有服务器的情况下使用iPhone自动续订

android - Facebook Android SDK 注销监听器

java - 解析 HTML(安卓)

iphone - iOS 应用内购买 - "Invalid Product ID"处于发布版本,而非开发版本

iphone - 自动续订订阅错误

Android 应用内结算 SecurityException "Binder invocation to an incorrect interface"

java - R 无法解析为变量 - Hello World