- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在研究使用 google play 在应用计费中实现自动续订订阅的方法。我读了 https://developer.android.com/google/play/billing/billing_subscriptions.html看看
Billing continues indefinitely at the interval and price specified for the subscription. At each subscription renewal, Google Play charges the user account automatically, then notifies the user of the charges afterward by email. For monthly and annual subscriptions, billing cycles will always match subscription cycles, based on the purchase date. (Seasonal subscriptions are charged annually, on the first day of the season.)
When the subscription payment is approved, Google Play provides a purchase token back to the purchasing app through the In-app Billing API. Your apps can store the token locally or pass it to your backend servers, which can then use it to validate or cancel the subscription remotely using the Google Play Developer API.
Recommendation: Include business logic in your app to notify yourbackend servers of subscription purchases, tokens, and any billingerrors that may occur. Your backend servers can use the server-sideAPI to query and update your records and follow up with customersdirectly, if needed.
最佳答案
我目前有完全相同的问题。谷歌的概念并不完善。有可能通知您的后端服务器有关金融交易的信息(请参阅 here ),但我不建议这样做。您的业务交易依赖于许多 Google 服务和您的服务器正常运行时间。如果出现任何问题或出现故障或其他问题,您将不会收到通知,并且您的后端业务逻辑将不再起作用。
你提到的谷歌推荐也很糟糕。如果存在自动更新(向您的应用程序提供新的购买 token )并且用户从未打开您的应用程序,会发生什么情况。那么新的订阅数据将永远不会传输到您的服务器。如果您从未获得过新 token ,您如何检查用户是否仍然是订阅者,因为这个受限的 Google Play Developer API 愚蠢地需要一个 purchaseToken 作为参数(请参阅 here ),而您永远不会像用户一样获得该 token 自动续订后至少不会打开您的应用程序(将其提交到您的服务器)。
我想以这种方式实现这一点:
1.) 我通过 cron 作业不断检查购买记录。购买记录是一个数据库条目,其中包含来自初始订阅的所有数据(orderId、purchaseToken 等,所有这些都是 security validation process on the server 所需的)。每个购买记录都连接到我后端系统中的用户帐户(某些用户 ID)。只要自动续订 purchaseRecord 的属性不为 false,订阅有效。即使到期时间Millis 超出,这个用户仍然可以有一个有效的订阅,因为我上面描述的用例:订阅将由谷歌自动续订,但用户从未打开应用程序,因此不会将传输 token 发送到您的服务器,您仍然没有被告知订阅更新。
2.) 如果用户在任何时候取消订阅,自动续订 随时都会是假的。这意味着订阅确实会在 结束。到期时间Millis .
3.) 当用户打开您的应用程序并将新的purchaseToken 转移到您的后端时,您将获得一个新的购买记录,该记录再次连接到具有他的用户ID 的用户帐户。用户现在可能有 2 条购买记录。旧的和新的。如果是这样,您可以删除旧的,并在步骤 1 中对新的购买记录重复相同的过程。
到目前为止我还没有实现这个概念,所以我不知道这是否真的像这样。也许这可以以不同的方式运作,但也许这是朝着正确方向迈出的一步。
关于in-app-billing - 如何在应用计费谷歌播放中实现自动续订订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45812541/
先明确我的问题 使用sql server 2008 enterprise作为数据库服务器检查我的代码 表格 View ApCclNoBudgDeptItemIDItem NameQ
为了从 C++ 模型在 QML 中显示一些像素图,我使用了 QQuickImageProvider : class ImageProvider : public QQuickImageProvider
我有一个服务连接,用于 Azure DevOps 中的管道。它是由另一位用户不久前创建的。最近它过期了,不允许我更改与之关联的用户名。因此,我删除了该服务连接并创建了一个新的连接,并且花了我很多时间来
我有一个服务连接,用于 Azure DevOps 中的管道。它是由另一位用户不久前创建的。最近它过期了,不允许我更改与之关联的用户名。因此,我删除了该服务连接并创建了一个新的连接,并且花了我很多时间来
我需要为我的移动应用续订 iOS 分发证书,并希望聘请一名自由职业者来帮我完成此操作。 我知道,这需要使用 Apple 开发者帐户来完成 - 但我不想给他 root 访问权限。最好的方法是什么? 感谢
今天早上,我尝试为我的 iOS 应用程序上传一个包含一些错误修复的新版本到 AppStore,存档二进制文件成功,但我无法将其上传到 itunesConnect 进行发布。该错误与某些分发证书有关,因
订阅用户 取消或订阅(过期) 重新点击订阅链接以续订。 它会续订相同的订阅还是创建新订阅? 如果我们创建新的订阅,我们是否应该删除旧的过期订阅? 我想知道,订阅到期后我们应该如何处理。 最佳答案 在我
距离 Apple 开发者证书到期还有大约一周的时间。我不小心丢失了创建当前正在使用的最后一个证书时使用的 CSR 文件。 如果我要与另一个 CSR 一起获得新证书,您能否告诉我可能会遇到的所有问题?
我正在使用 WebDav 将元数据放在服务器的文件和文件夹中,并根据文件的 ETag 属性使用缓存来避免对服务器进行不必要的请求。 基本上,我发送一个 HEAD 请求并检查 ETag 是否与我在本地的
我正在尝试自动更新 RunAsAccount 的证书。在门户中,有一个简单的按钮,可让您续订帐户的证书。然而,这在商业案例中并不合适。 我找到了一些使用 PowerShell 更新该证书的解决方案,但
我有一个 React 应用程序,它使用 Azure B2C 对用户进行身份验证(PKCE 流)。只要用户有一些事件,就需要保持 session 事件。 我无法对 session 超时使用“滚动”,因为
刚刚更新了我们的 SSL 证书并上传到 Azure 并更改了 ServiceConfiguration 文件中的指纹,当我尝试部署时收到错误: “服务升级包指定输入端点 HttpsIn,它与角色 Ti
在 Azure Active Directory 中配置应用程序时,您可以创建有效期为 1 或 2 年的 key 。在拥有许多服务和客户的组织中,如何管理 key 续订? 当 key 即将到期时,Az
我想使用 kubectl 命令续订证书并更新 AKS 中的证书。最好、最简单的方法是什么? 我已使用 KQL 查询并成功根据证书过期创建警报。现在我想要根据此警报采取行动。我不想为此使用逻辑应用或事件
我有一个 AppService,其中 SSL 证书即将过期。我有更新的证书。有没有办法通过powershell上传这个而不造成中断? 此外,我打算自动化 AppService 中证书续订和更改的整个过
我的分发证书即将到期,我想知道: 如果我撤销它并创建一个新的,我当前测试人员的应用程序会停止工作吗? 这些测试人员正在使用具有临时配置文件的应用构建版本。这些不是应用商店版本,而是测试版本。 我假设他
我最近尝试更新我的 letsencrypt ssl 证书,但是一旦我这样做了,每当我尝试连接到我的网站时,我都会收到 400 个服务器响应。我已经尝试了我能想到的一切。我附上了我的 Nginx 错误日
这是我的情况: 我有一个要分发的客户端应用程序 - 我们将其称为 MyClient。 MyClient 与我们的其中一台服务器进行一些 SSL 通信。 MyClient 中嵌入了根 CA,因此它可以对
我有一个来自 Godaddy 的 ssl 证书,该证书将在两个月后到期。我的主机也是 Godaddy Windows VPS。 godaddy的自动续订续订了我的证书,发邮件给我下载安装。所以我去了我
我一直在为我的一些 Elastic Beanstalk 应用程序使用 IAM 服务器证书,但现在是时候更新了——用更新后的证书替换当前证书的正确过程是什么? 当我尝试使用与之前相同的命令重复上传时:
我是一名优秀的程序员,十分优秀!