Google IAB诡异流量变化

Google IAB bizarre flow change

最近在我们的 Unity 游戏中测试应用内购买时,来自 Google Play 的流程发生了变化。我们正在使用 Unity 自带的应用内购买库。

启动购买后,我得到的不是绿色 "Buy" 按钮,而是灰色按钮:

每当购买完成时,我得到的不是 "Payment successful" 对话框,而是 "You've added X to your library":

一些其他补充:

我们所有的产品都被标记为消耗品,而且我从最初开发(当它工作时)开始就没有真正接触过代码。我什至不确定是什么触发了 "You've added X to your library" 流程。

我构建了一个单独的项目,除了一个类型为 Consumable、Nonconsumable 和 Subscription 的产品,它们都返回相同的对话框。

使用相同的 APK,它会在某些设备上提供正常行为,但在其他设备上会出现这种奇怪的行为(因此我们无法发布它,因为我们不确定是我们自己还是 public 会遇到同样的问题)。例如,在 Android 5.0 设备上,它将显示此行为,而在 5.1 上则不会,而在 6.0 上则会显示(注意:所有 3 台设备之前都显示了正确的功能)。

我也测试过这是否与成为 alpha 测试人员有关,或者被列为免费购买,但似乎无关紧要。我还下载了以前的版本(不使用 Unity IAP),它显示了相同的错误行为。

有人知道这里发生了什么吗?它似乎与 Google Play that to Unity

更相关

好的,这似乎与 Google Play 处理测试交易的方式发生变化有关(即 alpha/beta 不付款的用户的交易)

来自 Google 的一封邮件播放:

Hello Google Play Developer,

Beginning June 20, 2016, we’ll be making a change to test purchases for one-time in-app purchases (IAPs).

Previously, test purchases for one-time IAPs generated order IDs. Starting June 20, 2016, one-time IAPs will not generate order IDs and will not appear in the Merchant Center. This behavior already applies to subscription IAPs.

You can learn more about testing in-app billing in the Android Developers Help Center (which will be updated with the information above on June 20).

Thanks for supporting Google Play,

The Google Play Team​

在页面本身上,有一条注释:

Note: For test purchases, leave the orderId field blank. You can use the purchaseToken field to identify test purchases.​

我还没有找到如何实际使用 purchaseToken 来验证这一点的示例;购买令牌是加密的或压缩的 base64。

Unity 的人员正在修复:http://forum.unity3d.com/threads/bizarre-iap-behaviour-on-android.412981/#post-2698038

TL;DR:这只会影响沙盒购买,不会影响实时应用