gpt4 book ai didi

xamarin - 识别测试 GooglePlay 购买

转载 作者:行者123 更新时间:2023-12-02 09:40:06 29 4
gpt4 key购买 nike

我购买了三个不同期限的不同订阅。我已经配置了测试账户,我可以进行测试购买。对于这些购买,谷歌不向我收费,但它们看起来非常像真实的。购买成功后,应用内结算会向我发送一些有关我的购买的数据,例如 packageNameproductIdorderIdpurchaseToken等等。

在我的处理代码中,我需要以某种方式知道此次购买是否真实。简而言之:我真的为此赚钱了吗?或者这次购买是由某个测试帐户进行的,而我却一无所获?我需要这种信息来进行采购会计。

所以问题是:如何在代码中区分真实订阅购买和测试订阅购买?

谢谢。

附言我正在使用 Xamarin 和 C# 进行开发。

最佳答案

如果您的帐户未添加到您的 Google Play 开发者帐户的许可帐户列表中,您可以在 alpha/beta 版本上进行真正的购买。

检查 this :

With alpha/beta test groups, real users (chosen by you) can install your app from Google Play and test your in-app products. They can make real purchases that result in actual charges to their accounts, using any of their normal payment methods in Google Play to make purchases. Note that if you include test license accounts in your alpha and beta distribution groups, those users will only be able to make test purchases.

更新

要知道哪个购买是真实的,哪个是测试的,请在响应中检查 orderId。不会为测试购买分配 orderId。

Issue with Android IAP, no OrderID in Purchase Object

关于xamarin - 识别测试 GooglePlay 购买,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33904744/

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