适用于 Android 操作系统的 PayPal 应用内购买 - 服务器/客户端模型
我们正在为 Android 操作系统编写一个应用程序,它与服务器通信以执行其操作。
该应用程序是基于订阅的,服务器有责任让设备了解当前登录用户的订阅状态。
我们计划使用 PayPal 服务编写应用内购买,因此,我只需要知道,PayPal 是否支持服务器/客户端模型,就像 iOS 一样?
以下是我们针对 iPhone 应用程序遵循的详细流程。
- 设备 将购买请求发送到 Apple 的支付网关
- 支付网关发回经过数字签名的收据。
- 设备将此收据转发到我们的应用程序服务器
- 应用程序服务器将收据(用于验证)发送到 Apple 的公共 Web API
- Apple 的 Web API 验证收据的有效性并将收据的可读内容返回到应用程序服务器。
- 服务器调整付费用户的订阅并向设备发送“成功”。
We are writing an application for Android OS which communicates with a server to perform its operations.
This application is subscription based and it's the responsibility of server to let the device know about subscription status of currently logged-in user.
We are planning to write In-App purchase using PayPal services, Therefore,I just need to know, Does PayPal Supports Server/Client Model, like iOS Does?
The following is the detailed process we are following for iPhone Applications.
- Device Sends purchase request to Apple's payment gateway
- The payment gateway sends back a digitally signed receipt.
- The device forwards this receipt to our application server
- The application server sends the receipt (for verification) to Apple's public Web API
- Apple's Web API Verifies the validity of receipt and returns readable contents of receipt back to app server.
- The server adjusts the subscription of paid user and sends "Success" back to the device.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Google 昨天推出了应用内结算。
它使用Android Market进行支付。
详细的文档/示例可以在此处找到。
Google launched In-app billing yesterday.
It uses the Android Market for payment.
A detailed documentation/examples can be found here.