android - 应用内结算 V3

标签 android in-app-billing

我是 google play 应用内结算的新手,我从 google 下载示例并获得了 TrivialDrive 项目。我只是将 SKU_GAS 更改为 "android.test.purchased" 但在我成功购买燃料后,我得到了结果:

02-27 14:24:40.882: D/TrivialDrive(11805): Consumption finished. Purchase: PurchaseInfo(type:inapp):   
{"packageName":"com.example.android.trivialdrivesample","orderId":"transactionId.android.test.purchased","productId":"android.test.purchased","developerPayload":"","purchaseTime":0,"purchaseState":0,"purchaseToken":"inapp:com.example.android.trivialdrivesample:android.test.purchased"}, result: IabResult: Successful consume of sku android.test.purchased (response: 0:OK)

我的问题是为什么 purchaseTime = 0 ?什么是 developerPayload?谢谢

最佳答案

您得到 purchaseTime=0,因为您使用的是 android 测试产品:android.test.purchased。关于 developerPayload 这里是 api 解释:

A developer-specified string that contains supplemental information about an order. You can specify a value for this field when you make a getBuyIntent request.

在这里您可以找到更多信息Android In-App Billing .

关于android - 应用内结算 V3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15106396/

相关文章:

android - 订阅购买后无效的到期日期

java - 我如何在Android中停止线程

android - 编译 'com.firebaseui:firebase-ui:1.0.1' 显示错误

android - 应该维护多少个 Volley 请求队列?

android - Android 应用内订阅购买日期是否会随着每月续订而更新?

javascript - 有没有在node.js中实现的Android IAB(in-app billing)签名验证库?

android - 使用 Android MediaPlayer 类播放 URL 中的视频

android - 合并 2 个安卓应用

Android:设置应用内结算以打开新的 Activity 类

android - “The item you were attempting to purchase could not be found” Android应用内计费