Fortumo 获取计费状态 android 转到主要活动

发布于 2024-12-08 20:00:27 字数 182 浏览 0 评论 0原文

我需要有关 Fortumo 的帮助。我有 2 个课程:Pay.class 和 Main.class。当我打开应用程序时,它会运行 Pay.class 以通过 Fortumo 完成付款。支付成功后,跳转到Main.class。但当我打开应用程序时,它再次要求付款。现在,如果同一用户再次发送短信,应用程序将重新执行并接受付款。我希望用户只向我付款一次。

I need help regarding Fortumo. I have 2 classes: Pay.class and Main.class. When I open the application, it runs the Pay.class to complete the payment via Fortumo. After successful payment, it redirects to Main.class. But when I open the application it requests payment again. Now, if the same user sends sms again, the application re-executes and the payment is accepted. I want the user to pay me only once.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

记忆之渊 2024-12-15 20:00:27

您可以通过以下几种方式执行此操作:

  • 在设备上保存付款状态
    用户完成付款后,您将其保存到应用程序设置中,并在下次启动时,您将检查用户是否已付款。现在这仅适用于特定的手机。如果您希望用户能够在多个设备上消费您出售的商品,您应该将付款状态保存在外部服务器上。为此,您可以使用付款转发。

  • 保存支付状态服务器端
    如果您为应用内服务启用付款转发,则每次付款时,其结果都会转发到该付款转发 URL。它将包含所有付款信息,并使用 Product_name 参数,您也可以将用户名转发到您的服务器。现在,每次您的应用程序启动时,您都会询问您的服务器登录用户或具有该 ID 的用户购买了多少商品。

You have some options for doing that:

  • Saving payment status on device:
    After the user completes the payment you save it to your apps settings and on the next launch, you'll check, it the user has paid already. Now this will only work, for that specific mobile phone. If you want to users to be able to consume your sold goods on multiple devices you should save the payment state on an external server. For this you would use Payment forwarding.

  • Saving payment state server side:
    If you enable payment forwarding for your In App service then every time a payment is made, its result is forwarded to that payment forwarding url. It will have all payment information and using the product_name parameter you can forward the username to your server as well. Now each time your app launches you would ask your server how many items logged in user or user with that id has bought.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文