Android In App Billing …为什么有矛盾的信息?
作者:互联网
我和其他许多人一样,只是在验证静态响应是否有效后,尝试测试我的应用内购买.但是当我阅读文档,帖子和答案时,似乎没有任何结果.我变得非常沮丧.
我的最终目标是找出我是否可以在不收费的情况下进行测试.
这个文件说我可以 – 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 ……所有人都知道吗?可以不收费进行测试吗?如果是这样,怎么样?
解决方法:
如果您使用In App Billing版本3,则可以使用product id =“android.test.purchased”.它是虚拟产品,您不应该在开发人员控制台中添加它.你可以不收取任何费用购买该产品.
android.test.purchased
当您使用此产品ID制作应用内结算请求时,Google Play会像您成功购买商品一样进行回复.响应包括JSON字符串,其中包含虚假购买信息(例如,虚假订单ID).在某些情况下,JSON字符串已签名,响应中包含签名,因此您可以使用这些响应测试签名验证实现.
希望它会对你有所帮助.
标签:android,in-app-purchase,in-app-billing,billing,android-billing 来源: https://codeday.me/bug/20190625/1283740.html