我是 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/