gpt4 book ai didi

Android In App Billing...为什么会有矛盾的信息?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:10:31 26 4
gpt4 key购买 nike

我和许多其他人一样,只是在验证静态响应有效后尝试测试我的应用内购买。但是当我阅读文档、帖子和答案时,似乎没有任何结果。我变得非常沮丧。

我的最终目标是弄清楚我是否可以在不收费的情况下进行测试。

这个文档说我可以 - link

Once authorized with testing access, those users can side-load your app and test the full merchandising, purchase, and fulfillment flow for your products. Test purchases are real orders and Google Play processes them in the same way as other orders. When purchases are complete, Google Play prevents the orders from going to financial processing, ensuring that there are no actual charges to user accounts, and automatically canceling the completed orders after 14 days.

和相同的链接

During a test purchase, users can test the actual merchandising, purchase, and fulfillment flow in your app. During purchase, the inapp item is displayed as a normal item with an actual price. However, Google Play marks test purchases with a notice across the center of the purchase dialog, for easy identification

但是在这个页面上,它说 - link

Login to the test device by using a tester account. Test your In-app Billing application by purchasing a few items, and fix any issues that you encounter. Remember to refund the purchases if you don’t want your testers to be actually charged!

WTF...所以有人知道吗?可以做检测不收费吗?如果是这样,怎么做到的?

最佳答案

如果您使用的是应用内结算版本 3,那么您只需使用 product id="android.test.purchased"。它是虚拟产品,您不应将其添加到您的开发人员控制台中。您可以免费购买该产品。

android.test.purchased

当您使用此产品 ID 发出应用内结算请求时,Google Play 会做出响应,就像您成功购买了商品一样。响应包括一个 JSON 字符串,其中包含伪造的购买信息(例如,伪造的订单 ID)。在某些情况下,JSON 字符串已签名并且响应包含签名,因此您可以使用这些响应测试您的签名验证实现。

希望对你有所帮助。

关于Android In App Billing...为什么会有矛盾的信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17227985/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com